diff options
author | Yann E. MORIN <[email protected]> | 2016-07-10 09:38:46 +0000 |
---|---|---|
committer | Werner Koch <[email protected]> | 2016-07-12 08:42:56 +0000 |
commit | abcdfa7964da62b92984516608faf8941038b71d (patch) | |
tree | eb2d21dd251f2129e8f40f5c017580ce9dc22adc /src | |
parent | Define EWOULDBLOCK in case it is not defined (diff) | |
download | libgpg-error-abcdfa7964da62b92984516608faf8941038b71d.tar.gz libgpg-error-abcdfa7964da62b92984516608faf8941038b71d.zip |
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" <[email protected]>
Diffstat (limited to 'src')
-rw-r--r-- | src/gen-posix-lock-obj.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/gen-posix-lock-obj.c b/src/gen-posix-lock-obj.c index e32a3cd..e6f33ae 100644 --- a/src/gen-posix-lock-obj.c +++ b/src/gen-posix-lock-obj.c @@ -29,7 +29,9 @@ #include <string.h> #include <stdio.h> #include <errno.h> -#include <pthread.h> +#ifdef USE_POSIX_THREADS +# include <pthread.h> +#endif #include "posix-lock-obj.h" |