Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 8b8fb3d

Browse files
committed
Add 0 to _POSIX_SEMAPHORES. Will backport to 2.4.
1 parent 0f26054 commit 8b8fb3d

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

Python/thread_pthread.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,9 @@
1616
family of functions must indicate this by defining
1717
_POSIX_SEMAPHORES. */
1818
#ifdef _POSIX_SEMAPHORES
19-
#if _POSIX_SEMAPHORES == -1
19+
/* On FreeBSD 4.x, _POSIX_SEMAPHORES is defined empty, so
20+
we need to add 0 to make it work there as well. */
21+
#if (_POSIX_SEMAPHORES+0) == -1
2022
#define HAVE_BROKEN_POSIX_SEMAPHORES
2123
#else
2224
#include <semaphore.h>

0 commit comments

Comments
 (0)