Issue #7272: Add configure test to detect whether sem_open works
properly, and use this to skip test_multiprocessing on platforms
where sem_open raises a signal. This should fix some FreeBSD buildbot
failures for test_multiprocessing.
diff --git a/Modules/_multiprocessing/multiprocessing.h b/Modules/_multiprocessing/multiprocessing.h
index 7a79d6e..7c98ca7 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(HAVE_BROKEN_POSIX_SEMAPHORES)
# include <semaphore.h>
typedef sem_t *SEM_HANDLE;
# endif