Commits

Antoine Pitrou  committed ed5e598

Issue #10062: Allow building on platforms which do not have sem_timedwait.

  • Participants
  • Parent commits 51d304e

Comments (0)

Files changed (2)

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

File Python/thread_pthread.h

 /* Whether or not to use semaphores directly rather than emulating them with
  * mutexes and condition variables:
  */
-#if defined(_POSIX_SEMAPHORES) && !defined(HAVE_BROKEN_POSIX_SEMAPHORES)
+#if (defined(_POSIX_SEMAPHORES) && !defined(HAVE_BROKEN_POSIX_SEMAPHORES) && \
+     defined(HAVE_SEM_TIMEDWAIT))
 #  define USE_SEMAPHORES
 #else
 #  undef USE_SEMAPHORES