From d6e9073ba1a3fbb704566f5a1f224b9e7523dd46 Mon Sep 17 00:00:00 2001 From: Marko Lindqvist Date: Fri, 3 Mar 2023 06:26:16 +0200 Subject: [PATCH 2/2] 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 9b99ce923a..f1600b1bfd 100644 --- a/configure.ac +++ b/configure.ac @@ -874,11 +874,15 @@ if test x$crosser != xyes ; 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=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=pthreads])]) if test $thread_impl = pthreads ; then -- 2.39.2