Skip to content

Commit 19f8edc

Browse files
committed
Issue #10062: Allow building on platforms which do not have sem_timedwait.
1 parent 1bf29b7 commit 19f8edc

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

Misc/NEWS

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -346,6 +346,8 @@ Tests
346346
Build
347347
-----
348348

349+
- Issue #10062: Allow building on platforms which do not have sem_timedwait.
350+
349351
- Issue #10054: Some platforms provide uintptr_t in inttypes.h. Patch by
350352
Akira Kitada.
351353

Python/thread_pthread.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,8 @@
6464
/* Whether or not to use semaphores directly rather than emulating them with
6565
* mutexes and condition variables:
6666
*/
67-
#if defined(_POSIX_SEMAPHORES) && !defined(HAVE_BROKEN_POSIX_SEMAPHORES)
67+
#if (defined(_POSIX_SEMAPHORES) && !defined(HAVE_BROKEN_POSIX_SEMAPHORES) && \
68+
defined(HAVE_SEM_TIMEDWAIT))
6869
# define USE_SEMAPHORES
6970
#else
7071
# undef USE_SEMAPHORES

0 commit comments

Comments
 (0)