[Python-checkins] gh-81057: Fix the wasm32-wasi Buildbot (gh-100139)

ericsnowcurrently webhook-mailer at python.org
Fri Dec 9 12:18:14 EST 2022


https://github.com/python/cpython/commit/8d0bd93ae28299f9b2cd11d3dd1a49599b62430a
commit: 8d0bd93ae28299f9b2cd11d3dd1a49599b62430a
branch: main
author: Eric Snow <ericsnowcurrently at gmail.com>
committer: ericsnowcurrently <ericsnowcurrently at gmail.com>
date: 2022-12-09T10:17:54-07:00
summary:

gh-81057: Fix the wasm32-wasi Buildbot (gh-100139)

The build was broken by gh-100084.

https://github.com/python/cpython/issues/81057

files:
M Include/internal/pycore_pythread.h
M Python/thread_pthread.h

diff --git a/Include/internal/pycore_pythread.h b/Include/internal/pycore_pythread.h
index 4aeb285b89a8..f53921494c15 100644
--- a/Include/internal/pycore_pythread.h
+++ b/Include/internal/pycore_pythread.h
@@ -33,7 +33,7 @@ extern "C" {
 # endif /* _POSIX_THREADS */
 #endif /* _POSIX_THREADS */
 
-#if defined(_POSIX_THREADS) && !defined(HAVE_PTHREAD_STUBS)
+#if defined(_POSIX_THREADS) || defined(HAVE_PTHREAD_STUBS)
 # define _USE_PTHREADS
 #endif
 
diff --git a/Python/thread_pthread.h b/Python/thread_pthread.h
index ae312e987bd6..76d6f3bcdf9c 100644
--- a/Python/thread_pthread.h
+++ b/Python/thread_pthread.h
@@ -132,7 +132,8 @@ init_condattr(void)
     if (pthread_condattr_setclock(&ca, CLOCK_MONOTONIC) == 0) {
         condattr_monotonic = &ca;  // Use monotonic clock
     }
-#endif
+# undef ca
+#endif  // CONDATTR_MONOTONIC
 }
 
 int



More information about the Python-checkins mailing list