summaryrefslogtreecommitdiff
path: root/Python/thread.c
diff options
context:
space:
mode:
authorMatthias Klose <doko@ubuntu.com>2004-08-16 11:35:51 +0000
committerMatthias Klose <doko@ubuntu.com>2004-08-16 11:35:51 +0000
commita2542bee597cbbc382d17ad6bd7ad4fce09d71b8 (patch)
treee90e031dda0c1fdad7f8d09117803bdf7e4840bd /Python/thread.c
parentd3fe2395b4f85f307d437f5b5b1f69e297d1fe11 (diff)
downloadcpython-git-a2542bee597cbbc382d17ad6bd7ad4fce09d71b8.tar.gz
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
Diffstat (limited to 'Python/thread.c')
-rw-r--r--Python/thread.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/Python/thread.c b/Python/thread.c
index 8bc958f9cd..0294365067 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 <pthread.h> /* _POSIX_THREADS */
+# endif
+#endif
+
#ifndef DONT_HAVE_STDIO_H
#include <stdio.h>
#endif