libatomic_ops-nothread-build-failure-fix.patch 986 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. From 7e940ce34ff4de254d460344f1a1a486a14fb045 Mon Sep 17 00:00:00 2001
  2. From: Gilles Talis <gilles.talis@gmail.com>
  3. Date: Wed, 22 May 2013 16:21:26 -0700
  4. Subject: [PATCH] Fix build failure seen when using toolchain without threads support
  5. Signed-off-by: Gilles Talis <gilles.talis@gmail.com>
  6. ---
  7. src/atomic_ops.c | 4 ++++
  8. 1 files changed, 4 insertions(+), 0 deletions(-)
  9. diff --git a/src/atomic_ops.c b/src/atomic_ops.c
  10. index b6731a2..5769643 100644
  11. --- a/src/atomic_ops.c
  12. +++ b/src/atomic_ops.c
  13. @@ -48,7 +48,9 @@
  14. #undef AO_REQUIRE_CAS
  15. +#if defined(AO_USE_PTHREAD_DEFS)
  16. #include <pthread.h>
  17. +#endif
  18. #ifndef AO_USE_NO_SIGNALS
  19. # include <signal.h>
  20. @@ -72,11 +74,13 @@
  21. # include "atomic_ops/sysdeps/standard_ao_double_t.h"
  22. #endif
  23. +#if defined(AO_USE_PTHREAD_DEFS)
  24. /*
  25. * Lock for pthreads-based implementation.
  26. */
  27. pthread_mutex_t AO_pt_lock = PTHREAD_MUTEX_INITIALIZER;
  28. +#endif
  29. /*
  30. * Out of line compare-and-swap emulation based on test and set.
  31. --
  32. 1.7.4.1