From bd3c7913ba9a64d79a0f51ebbcd45fcaa6308f13 Mon Sep 17 00:00:00 2001 From: Marko Lindqvist Date: Fri, 3 Mar 2023 06:20:05 +0200 Subject: [PATCH 30/30] configure: Fix nonnull compiler warnings from pthreads test Under some circumstances they may have caused the test to fail when it should have succeeded. See osdn #47474 Signed-off-by: Marko Lindqvist --- configure.ac | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/configure.ac b/configure.ac index ab8c74a5c3..5e8c2b0534 100644 --- a/configure.ac +++ b/configure.ac @@ -1058,11 +1058,15 @@ if test "x$crosser" != "xyes" && test "x$thread_impl_cpp" = "xnone" ; then FC_C_FLAGS([-pthread], [], [CFLAGS]) FC_LD_FLAGS([-pthread], [], [LIBS]) AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include ]], - [[return pthread_create(NULL, NULL, NULL, NULL);]])], + [[void *(*srout)(void *); +void *arg; +return pthread_create(NULL, NULL, srout, arg);]])], [thread_impl_cpp=pthreads], [LIBS="$LIBS -lpthread" AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include ]], - [[return pthread_create(NULL, NULL, NULL, NULL);]])], + [[void *(*srout)(void *); +void *arg; +return pthread_create(NULL, NULL, srout, arg);]])], [thread_impl_cpp=pthreads thr_libs_pthreads=" -lpthread"]) LIBS="$LIBS_SAVE" -- 2.39.2