refactor: fail without posix sigwait, remove from Config.h.in

based on 998a9d1735
This commit is contained in:
sithlord48
2025-10-31 08:37:52 -04:00
committed by Nick Bolton
parent 1f950f4c2a
commit 6ff8b053af
3 changed files with 4 additions and 8 deletions

View File

@ -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

View File

@ -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 <X11/extensions/Xrandr.h> header file. */
#cmakedefine HAVE_X11_EXTENSIONS_XRANDR_H @HAVE_X11_EXTENSIONS_XRANDR_H@

View File

@ -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) {