You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

38 lines
1.3 KiB

  1. From 43a4bc6b750c37f585d03b14941f3633ed5348d8 Mon Sep 17 00:00:00 2001
  2. From: "Azamat H. Hackimov" <azamat.hackimov@gmail.com>
  3. Date: Tue, 9 Jun 2020 11:30:38 +0300
  4. Subject: [PATCH] Fix compilation with GCC10
  5. Fixed compilation with -fno-common, which enabled in GCC 10 by default.
  6. See https://bugs.gentoo.org/707438.
  7. ---
  8. module/owserver/src/c/owserver.c | 2 ++
  9. module/owserver/src/include/owserver.h | 2 +-
  10. 2 files changed, 3 insertions(+), 1 deletion(-)
  11. diff --git a/module/owserver/src/c/owserver.c b/module/owserver/src/c/owserver.c
  12. index db29988e..2ed29161 100644
  13. --- a/module/owserver/src/c/owserver.c
  14. +++ b/module/owserver/src/c/owserver.c
  15. @@ -36,6 +36,8 @@
  16. #include "owserver.h"
  17. +pthread_mutex_t persistence_mutex ;
  18. +
  19. /* --- Prototypes ------------ */
  20. static void SetupAntiloop(int argc, char **argv);
  21. diff --git a/module/owserver/src/include/owserver.h b/module/owserver/src/include/owserver.h
  22. index 8be582f0..a257ed02 100644
  23. --- a/module/owserver/src/include/owserver.h
  24. +++ b/module/owserver/src/include/owserver.h
  25. @@ -18,7 +18,7 @@
  26. #include "ow.h"
  27. #include "ow_connection.h"
  28. -pthread_mutex_t persistence_mutex ;
  29. +extern pthread_mutex_t persistence_mutex ;
  30. #define PERSISTENCELOCK _MUTEX_LOCK( persistence_mutex ) ;
  31. #define PERSISTENCEUNLOCK _MUTEX_UNLOCK( persistence_mutex ) ;