From: Antoine Pitrou Date: Sun, 10 Oct 2010 08:37:22 +0000 (+0000) Subject: Issue #10062: Allow building on platforms which do not have sem_timedwait. X-Git-Tag: v3.2a3~4 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=19f8edc39d344b12f8b60c3c23bdfb8e523593b7;p=thirdparty%2FPython%2Fcpython.git Issue #10062: Allow building on platforms which do not have sem_timedwait. --- diff --git a/Misc/NEWS b/Misc/NEWS index 81dc552e7e7a..e90cb370d97e 100644 --- a/Misc/NEWS +++ b/Misc/NEWS @@ -346,6 +346,8 @@ Tests 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. diff --git a/Python/thread_pthread.h b/Python/thread_pthread.h index a529b7a7eb19..c007c8b90674 100644 --- a/Python/thread_pthread.h +++ b/Python/thread_pthread.h @@ -64,7 +64,8 @@ /* 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