Skip to content

Commit

Permalink
pythongh-108724: Fix _PySemaphore compile error on WASM
Browse files Browse the repository at this point in the history
Some WASM platforms have POSIX semaphores, but not sem_timedwait.
  • Loading branch information
colesbury committed Sep 19, 2023
1 parent 0c89056 commit a9c0a5b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Include/internal/pycore_semaphore.h
Expand Up @@ -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
Expand Down

0 comments on commit a9c0a5b

Please sign in to comment.