summaryrefslogtreecommitdiffstats
path: root/Python/thread_pthread.h
diff options
context:
space:
mode:
authorChristian Heimes <christian@python.org>2022-07-27 18:28:06 (GMT)
committerGitHub <noreply@github.com>2022-07-27 18:28:06 (GMT)
commit0fe645d6fd22a6f57e777a29e65cf9a4ff9785ae (patch)
treea6222de1305545869eed745741bbf1f1b3e5f728 /Python/thread_pthread.h
parent226d02bb109d08601fbccd645e9d67aee2e5bcdc (diff)
downloadcpython-0fe645d6fd22a6f57e777a29e65cf9a4ff9785ae.zip
cpython-0fe645d6fd22a6f57e777a29e65cf9a4ff9785ae.tar.gz
cpython-0fe645d6fd22a6f57e777a29e65cf9a4ff9785ae.tar.bz2
gh-95174: Add pthread stubs for WASI (GH-95234)
Co-authored-by: Brett Cannon <brett@python.org>
Diffstat (limited to 'Python/thread_pthread.h')
-rw-r--r--Python/thread_pthread.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/Python/thread_pthread.h b/Python/thread_pthread.h
index c310d72..1c5b320 100644
--- a/Python/thread_pthread.h
+++ b/Python/thread_pthread.h
@@ -7,7 +7,9 @@
#if defined(__APPLE__) || defined(HAVE_PTHREAD_DESTRUCTOR)
#define destructor xxdestructor
#endif
-#include <pthread.h>
+#ifndef HAVE_PTHREAD_STUBS
+# include <pthread.h>
+#endif
#if defined(__APPLE__) || defined(HAVE_PTHREAD_DESTRUCTOR)
#undef destructor
#endif