From 56014755a3e7df37056cf5efff8732e698fd4124 Mon Sep 17 00:00:00 2001 From: Til Kaiser Date: Sat, 21 Jun 2025 12:44:15 +0200 Subject: [PATCH] configure.ac: check for stdarg.h Currently, there is the following compile error while building with -std=gnu23, which is now default for GCC 15: src/shared/shell.c: In function 'rl_cleanup': src/shared/shell.c:1435:9: error: too many arguments to function 'rl_message'; expected 0, have 2 1435 | rl_message("%s", ""); | ^~~~~~~~~~ ~~~~ In file included from src/shared/shell.c:29: /usr/include/readline/readline.h:410:12: note: declared here 410 | extern int rl_message (); | ^~~~~~~~~~ This adds a check for stdarg.h inside the configure script so that HAVE_STDARG_H gets defined and the correct prototype is picked from readline.h. --- configure.ac | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index 07aeb46ca..10d63d67f 100644 --- a/configure.ac +++ b/configure.ac @@ -70,7 +70,8 @@ AC_CHECK_LIB(pthread, pthread_create, dummy=yes, AC_CHECK_LIB(dl, dlopen, dummy=yes, AC_MSG_ERROR(dynamic linking loader is required)) -AC_CHECK_HEADERS(stdio.h string.h linux/types.h linux/if_alg.h linux/uinput.h linux/uhid.h sys/random.h) +AC_CHECK_HEADERS(stdarg.h stdio.h string.h linux/types.h linux/if_alg.h \ + linux/uinput.h linux/uhid.h sys/random.h) # basename may be only available in libgen.h with the POSIX behavior, # not desired here -- 2.47.3