diff --git a/cmake/Libraries.cmake b/cmake/Libraries.cmake index 69e9d86e8..0fa995afc 100644 --- a/cmake/Libraries.cmake +++ b/cmake/Libraries.cmake @@ -117,6 +117,10 @@ macro(configure_unix_libs) endif() check_function_exists(sigwait HAVE_POSIX_SIGWAIT) + if (NOT HAVE_POSIX_SIGWAIT) + message(FATAL_ERROR "Missing posix sigwait") + endif() + check_function_exists(inet_aton HAVE_INET_ATON) # For some reason, the check_function_exists macro doesn't detect the @@ -140,7 +144,6 @@ macro(configure_unix_libs) # needed. list(APPEND libs nsl socket) endif() - endif() # pthread is used on both Linux and Mac diff --git a/src/lib/Config.h.in b/src/lib/Config.h.in index 9d12a568d..9a3036890 100644 --- a/src/lib/Config.h.in +++ b/src/lib/Config.h.in @@ -10,9 +10,6 @@ /* Define if you have the `inet_aton` function. */ #cmakedefine HAVE_INET_ATON @HAVE_INET_ATON@ -/* Define if you have a POSIX `sigwait` function. */ -#cmakedefine HAVE_POSIX_SIGWAIT @HAVE_POSIX_SIGWAIT@ - /* Define to 1 if you have the header file. */ #cmakedefine HAVE_X11_EXTENSIONS_XRANDR_H @HAVE_X11_EXTENSIONS_XRANDR_H@ diff --git a/src/lib/arch/unix/ArchMultithreadPosix.cpp b/src/lib/arch/unix/ArchMultithreadPosix.cpp index e4b4c340a..44e00b0c5 100644 --- a/src/lib/arch/unix/ArchMultithreadPosix.cpp +++ b/src/lib/arch/unix/ArchMultithreadPosix.cpp @@ -672,12 +672,8 @@ void *ArchMultithreadPosix::threadSignalHandler(void *) // we exit the loop via thread cancellation in sigwait() for (;;) { // wait -#if HAVE_POSIX_SIGWAIT int signal = 0; sigwait(&sigset, &signal); -#else - sigwait(&sigset); -#endif // if we get here then the signal was raised switch (signal) {