configure: improve pthread_sigmask detection.
authorShai Levy <58184723+shailevi23@users.noreply.github.com>
Mon, 16 Oct 2023 11:26:20 +0000 (14:26 +0300)
committerShai Levy <shailevy@google.com>
Thu, 19 Oct 2023 11:53:16 +0000 (11:53 +0000)
On Windows system, pthread_sigmask is defined as a noop which will
trigger unused variable warning for sigmask.
By triggering the same warning in the configure script, we make
CONFIG_PTHREAD_SIGMASK undefined in the Windows msys2 build.

Signed-off-by: Shai Levy <shailevy23@gmail.com>.
configure

index 36184a58ad6652ba2f14611218f5a48cf8248de3..742cb7c533c965a65a087d44168500a13d67608d 100755 (executable)
--- a/configure
+++ b/configure
@@ -864,7 +864,8 @@ cat > $TMPC <<EOF
 #include <signal.h> /* pthread_sigmask() */
 int main(void)
 {
-  return pthread_sigmask(0, NULL, NULL);
+  sigset_t sigmask;
+  return pthread_sigmask(0, NULL, &sigmask);
 }
 EOF
 if compile_prog "" "$LIBS" "pthread_sigmask" ; then