mirror of https://github.com/python/cpython
gh-108724: Fix _PySemaphore compile error on WASM (gh-109583)
Some WASM platforms have POSIX semaphores, but not sem_timedwait.
This commit is contained in:
parent
0c89056fe5
commit
9df6712c12
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue