0001-Fix-an-issue-compiling-with-pthreads-disabled.patch 943 B

123456789101112131415161718192021222324252627
  1. From 2e1a982ed0eef1188ad15995e177e7d40746685f Mon Sep 17 00:00:00 2001
  2. From: Corey Minyard <cminyard@mvista.com>
  3. Date: Tue, 7 Jan 2020 11:34:33 -0600
  4. Subject: [PATCH] Fix an issue compiling with pthreads disabled
  5. Define PTHREAD_MUTEX_INITIALIZER in this case.
  6. Signed-off-by: Corey Minyard <cminyard@mvista.com>
  7. [Retrieved from:
  8. https://github.com/cminyard/gensio/commit/2e1a982ed0eef1188ad15995e177e7d40746685f]
  9. Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
  10. ---
  11. lib/gensio_selector.c | 1 +
  12. 1 file changed, 1 insertion(+)
  13. diff --git a/lib/gensio_selector.c b/lib/gensio_selector.c
  14. index c050df0..66ada01 100644
  15. --- a/lib/gensio_selector.c
  16. +++ b/lib/gensio_selector.c
  17. @@ -30,6 +30,7 @@
  18. #define pthread_mutex_unlock(l) do { } while (0)
  19. #define pthread_mutex_init(l, n) do { } while (0)
  20. #define pthread_mutex_destroy(l, n) do { } while (0)
  21. +#define PTHREAD_MUTEX_INITIALIZER 0
  22. #endif
  23. #include <gensio/gensio_selector.h>