Skip to content

Commit

Permalink
pythongh-108724: Fix _PySemaphore compile error on WASM (pythongh-109583
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 authored and csm10495 committed Sep 28, 2023
1 parent 867e79e commit cd452fb
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Include/internal/pycore_semaphore.h
Original file line number Diff line number Diff line change
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 cd452fb

Please sign in to comment.