diff options
Diffstat (limited to 'Modules')
-rw-r--r-- | Modules/_multiprocessing/multiprocessing.c | 5 | ||||
-rw-r--r-- | Modules/_multiprocessing/multiprocessing.h | 2 |
2 files changed, 4 insertions, 3 deletions
diff --git a/Modules/_multiprocessing/multiprocessing.c b/Modules/_multiprocessing/multiprocessing.c index afa2599..b09fb25 100644 --- a/Modules/_multiprocessing/multiprocessing.c +++ b/Modules/_multiprocessing/multiprocessing.c @@ -263,7 +263,8 @@ PyInit__multiprocessing(void) Py_INCREF(&ConnectionType); PyModule_AddObject(module, "Connection", (PyObject*)&ConnectionType); -#if defined(MS_WINDOWS) || defined(HAVE_SEM_OPEN) +#if defined(MS_WINDOWS) || \ + (defined(HAVE_SEM_OPEN) && !defined(POSIX_SEMAPHORES_NOT_ENABLED)) /* Add SemLock type to module */ if (PyType_Ready(&SemLockType) < 0) return NULL; @@ -311,7 +312,7 @@ PyInit__multiprocessing(void) Py_DECREF(temp); Py_DECREF(value); return NULL; } \ Py_DECREF(value) -#ifdef HAVE_SEM_OPEN +#if defined(HAVE_SEM_OPEN) && !defined(POSIX_SEMAPHORES_NOT_ENABLED) ADD_FLAG(HAVE_SEM_OPEN); #endif #ifdef HAVE_SEM_TIMEDWAIT diff --git a/Modules/_multiprocessing/multiprocessing.h b/Modules/_multiprocessing/multiprocessing.h index 7a79d6e..3dd0199 100644 --- a/Modules/_multiprocessing/multiprocessing.h +++ b/Modules/_multiprocessing/multiprocessing.h @@ -27,7 +27,7 @@ # include <sys/socket.h> # include <sys/uio.h> # include <arpa/inet.h> /* htonl() and ntohl() */ -# ifdef HAVE_SEM_OPEN +# if defined(HAVE_SEM_OPEN) && !defined(POSIX_SEMAPHORES_NOT_ENABLED) # include <semaphore.h> typedef sem_t *SEM_HANDLE; # endif |