0001-Fix-compilation-with-GCC10.patch 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  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. [Retrieved from:
  8. https://github.com/owfs/owfs/commit/43a4bc6b750c37f585d03b14941f3633ed5348d8]
  9. Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
  10. ---
  11. module/owserver/src/c/owserver.c | 2 ++
  12. module/owserver/src/include/owserver.h | 2 +-
  13. 2 files changed, 3 insertions(+), 1 deletion(-)
  14. diff --git a/module/owserver/src/c/owserver.c b/module/owserver/src/c/owserver.c
  15. index db29988e..2ed29161 100644
  16. --- a/module/owserver/src/c/owserver.c
  17. +++ b/module/owserver/src/c/owserver.c
  18. @@ -36,6 +36,8 @@
  19. #include "owserver.h"
  20. +pthread_mutex_t persistence_mutex ;
  21. +
  22. /* --- Prototypes ------------ */
  23. static void SetupAntiloop(int argc, char **argv);
  24. diff --git a/module/owserver/src/include/owserver.h b/module/owserver/src/include/owserver.h
  25. index 8be582f0..a257ed02 100644
  26. --- a/module/owserver/src/include/owserver.h
  27. +++ b/module/owserver/src/include/owserver.h
  28. @@ -18,7 +18,7 @@
  29. #include "ow.h"
  30. #include "ow_connection.h"
  31. -pthread_mutex_t persistence_mutex ;
  32. +extern pthread_mutex_t persistence_mutex ;
  33. #define PERSISTENCELOCK _MUTEX_LOCK( persistence_mutex ) ;
  34. #define PERSISTENCEUNLOCK _MUTEX_UNLOCK( persistence_mutex ) ;