summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorYann E. MORIN <yann.morin.1998@free.fr>2016-07-10 11:38:46 +0200
committerWerner Koch <wk@gnupg.org>2016-07-12 10:42:56 +0200
commitabcdfa7964da62b92984516608faf8941038b71d (patch)
treeeb2d21dd251f2129e8f40f5c017580ce9dc22adc /tests
parent65e967627b3d60f550c7d302227dcf9f797e437f (diff)
downloadlibgpg-error-abcdfa7964da62b92984516608faf8941038b71d.tar.gz
Fix build without threads
* src/gen-posix-lock-obj.c: properly guard inclusioin of pthread.h * tests/t-lock.c: likewise * tests/t-poll.c: likewise -- Although ./configure checks for thread support, gen-posix-lock-obj and two tests still include pthread.h unconditionally. Guard that inclusion using the same condition as all other uses of pthread-related code. Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Diffstat (limited to 'tests')
-rw-r--r--tests/t-lock.c4
-rw-r--r--tests/t-poll.c4
2 files changed, 6 insertions, 2 deletions
diff --git a/tests/t-lock.c b/tests/t-lock.c
index 38c9cec..6add18b 100644
--- a/tests/t-lock.c
+++ b/tests/t-lock.c
@@ -31,7 +31,9 @@
# include <windows.h>
# include <time.h>
#else
-# include <pthread.h>
+# ifdef USE_POSIX_THREADS
+# include <pthread.h>
+# endif
#endif
#define PGM "t-lock"
diff --git a/tests/t-poll.c b/tests/t-poll.c
index 811f895..a26cbfa 100644
--- a/tests/t-poll.c
+++ b/tests/t-poll.c
@@ -34,7 +34,9 @@
# include <windows.h>
# include <time.h>
#else
-# include <pthread.h>
+# ifdef USE_POSIX_THREADS
+# include <pthread.h>
+# endif
#endif
#define PGM "t-lock"