File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -189,6 +189,8 @@ Core and Builtins
189189Library
190190-------
191191
192+ - Issue #9586: Redefine SEM_FAILED on MacOSX to keep compiler happy.
193+
192194- Issue 10527: make multiprocessing use poll() instead of select() if available.
193195
194196- Issue #16485: Fix file descriptor not being closed if file header patching
Original file line number Diff line number Diff line change @@ -197,6 +197,13 @@ semlock_release(SemLockObject *self, PyObject *args)
197197#define SEM_GETVALUE (sem , pval ) sem_getvalue(sem, pval)
198198#define SEM_UNLINK (name ) sem_unlink(name)
199199
200+ /* OS X 10.4 defines SEM_FAILED as -1 instead of (sem_t *)-1; this gives
201+ compiler warnings, and (potentially) undefined behaviour. */
202+ #ifdef __APPLE__
203+ # undef SEM_FAILED
204+ # define SEM_FAILED ((sem_t *)-1)
205+ #endif
206+
200207#ifndef HAVE_SEM_UNLINK
201208# define sem_unlink (name ) 0
202209#endif
You can’t perform that action at this time.
0 commit comments