From a2542bee597cbbc382d17ad6bd7ad4fce09d71b8 Mon Sep 17 00:00:00 2001 From: Matthias Klose Date: Mon, 16 Aug 2004 11:35:51 +0000 Subject: The attached patch fixes FTBFS on GNU/k*BSD. The problem happens on GNU/k*BSD because GNU/k*BSD uses gnu pth to provide pthreads, but will also happen on any system that does the same. python fails to build because it doesn't detect gnu pth in pthread emulation. See C comments in patch for details. patch taken from http://bugs.debian.org/264315 --- Python/thread.c | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'Python/thread.c') diff --git a/Python/thread.c b/Python/thread.c index 8bc958f9cd9..0294365067b 100644 --- a/Python/thread.c +++ b/Python/thread.c @@ -7,6 +7,16 @@ #include "Python.h" + +#ifndef _POSIX_THREADS +/* This means pthreads are not implemented in libc headers, hence the macro + not present in unistd.h. But they still can be implemented as an external + library (e.g. gnu pth in pthread emulation) */ +# ifdef HAVE_PTHREAD_H +# include /* _POSIX_THREADS */ +# endif +#endif + #ifndef DONT_HAVE_STDIO_H #include #endif -- cgit v1.2.3