From 60ceedbdd5b5fb22803039a59954798d931f659a Mon Sep 17 00:00:00 2001 From: Thomas Klausner Date: Tue, 18 Jan 2022 21:38:35 +0100 Subject: [PATCH] bpo-46045: Do not use POSIX semaphores on NetBSD (GH-30047) This fixes hanging tests test_compileall,, test_multiprocessing_fork and test_concurrent_futures. --- .../2021-12-11-11-36-48.bpo-46045.sfThay.rst | 1 + configure | 4 ++++ configure.ac | 3 +++ 3 files changed, 8 insertions(+) create mode 100644 Misc/NEWS.d/next/Core and Builtins/2021-12-11-11-36-48.bpo-46045.sfThay.rst diff --git a/Misc/NEWS.d/next/Core and Builtins/2021-12-11-11-36-48.bpo-46045.sfThay.rst b/Misc/NEWS.d/next/Core and Builtins/2021-12-11-11-36-48.bpo-46045.sfThay.rst new file mode 100644 index 00000000000..97fd1883eb2 --- /dev/null +++ b/Misc/NEWS.d/next/Core and Builtins/2021-12-11-11-36-48.bpo-46045.sfThay.rst @@ -0,0 +1 @@ +Do not use POSIX semaphores on NetBSD diff --git a/configure b/configure index 1dee645c387..7236e0930e1 100755 --- a/configure +++ b/configure @@ -13006,6 +13006,10 @@ $as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h AIX/*) $as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h + ;; + NetBSD/*) +$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h + ;; esac diff --git a/configure.ac b/configure.ac index 7b084a264d4..aea12128c12 100644 --- a/configure.ac +++ b/configure.ac @@ -3716,6 +3716,9 @@ if test "$posix_threads" = "yes"; then AIX/*) AC_DEFINE(HAVE_BROKEN_POSIX_SEMAPHORES, 1, [Define if the Posix semaphores do not work on your system]) ;; + NetBSD/*) AC_DEFINE(HAVE_BROKEN_POSIX_SEMAPHORES, 1, + [Define if the Posix semaphores do not work on your system]) + ;; esac AC_CACHE_CHECK([if PTHREAD_SCOPE_SYSTEM is supported], [ac_cv_pthread_system_supported],