mirror of
https://gitlab.freedesktop.org/libbsd/libbsd.git
synced 2025-01-09 03:08:38 +01:00
build: Improve C99 compatibility of __progname configure check
The check uses printf, so it needs to include <stdio.h> for compilers which do not support implicit function declarations. (They were removed from C99.) Closes: !23 Signed-off-by: Guillem Jover <guillem@hadrons.org>
This commit is contained in:
parent
b9bf42ddc3
commit
5dea9da38d
@ -241,6 +241,7 @@ const char *p = program_invocation_short_name;
|
|||||||
AC_MSG_CHECKING([for __progname])
|
AC_MSG_CHECKING([for __progname])
|
||||||
AC_LINK_IFELSE([
|
AC_LINK_IFELSE([
|
||||||
AC_LANG_PROGRAM([[
|
AC_LANG_PROGRAM([[
|
||||||
|
#include <stdio.h>
|
||||||
extern char *__progname;
|
extern char *__progname;
|
||||||
]], [[
|
]], [[
|
||||||
printf("%s", __progname);
|
printf("%s", __progname);
|
||||||
|
Loading…
Reference in New Issue
Block a user