143870e535
Related to: <https://fedoraproject.org/wiki/Changes/PortingToModernC> <https://fedoraproject.org/wiki/Toolchain/PortingToModernC>
34 lines
993 B
Diff
34 lines
993 B
Diff
Include <stdio.h> to avoid an implicit declaration of the printf
|
|
function. Otherwise, the check always fails with compilers that
|
|
do not support implicit function declarations (a C feature removed
|
|
in 1999).
|
|
|
|
Submitted upstream: <https://github.com/lldpd/lldpd/pull/565>
|
|
|
|
diff --git a/configure b/configure
|
|
index 931bb75d69c1149d..d34641df4b3d8aed 100755
|
|
--- a/configure
|
|
+++ b/configure
|
|
@@ -18675,7 +18675,7 @@ else
|
|
|
|
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
|
/* end confdefs.h. */
|
|
-
|
|
+#include <stdio.h>
|
|
int
|
|
main ()
|
|
{
|
|
diff --git a/m4/progname.m4 b/m4/progname.m4
|
|
index 28ac1748f7005139..63ddda6ab9003e5d 100644
|
|
--- a/m4/progname.m4
|
|
+++ b/m4/progname.m4
|
|
@@ -3,7 +3,7 @@
|
|
#
|
|
AC_DEFUN([lldp_CHECK___PROGNAME],[
|
|
AC_CACHE_CHECK([whether libc defines __progname], lldp_cv_check___progname, [
|
|
- AC_TRY_LINK([],
|
|
+ AC_TRY_LINK([#include <stdio.h>],
|
|
[ extern char *__progname; printf("%s", __progname); ],
|
|
[ lldp_cv_check___progname="yes" ],
|
|
[ lldp_cv_check___progname="no" ])
|