diff options
author | Sam Gross <colesbury@gmail.com> | 2023-09-19 17:35:11 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-09-19 17:35:11 (GMT) |
commit | 9df6712c122b621dc5a1053ff1eccf0debfb2148 (patch) | |
tree | 98432c1b43f55223449b15b00d21cdcba147fa7a /Include | |
parent | 0c89056fe59ac42f09978582479d40e58a236856 (diff) | |
download | cpython-9df6712c122b621dc5a1053ff1eccf0debfb2148.zip cpython-9df6712c122b621dc5a1053ff1eccf0debfb2148.tar.gz cpython-9df6712c122b621dc5a1053ff1eccf0debfb2148.tar.bz2 |
gh-108724: Fix _PySemaphore compile error on WASM (gh-109583)
Some WASM platforms have POSIX semaphores, but not sem_timedwait.
Diffstat (limited to 'Include')
-rw-r--r-- | Include/internal/pycore_semaphore.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Include/internal/pycore_semaphore.h b/Include/internal/pycore_semaphore.h index c1df833..2a4ecb7 100644 --- a/Include/internal/pycore_semaphore.h +++ b/Include/internal/pycore_semaphore.h @@ -20,7 +20,8 @@ # error "Require native threads. See https://bugs.python.org/issue31370" #endif -#if defined(_POSIX_SEMAPHORES) && (_POSIX_SEMAPHORES+0) != -1 +#if (defined(_POSIX_SEMAPHORES) && (_POSIX_SEMAPHORES+0) != -1 && \ + defined(HAVE_SEM_TIMEDWAIT)) # define _Py_USE_SEMAPHORES # include <semaphore.h> #endif |