]> git.ipfire.org Git - thirdparty/lldpd.git/commitdiff
m4/progname.m4: Include <stdio.h> for printf in lldp_CHECK___PROGNAME
authorFlorian Weimer <fweimer@redhat.com>
Thu, 8 Dec 2022 12:01:07 +0000 (13:01 +0100)
committerVincent Bernat <vincent@bernat.ch>
Thu, 8 Dec 2022 18:11:11 +0000 (19:11 +0100)
Otherwise the checks always fails with a compiler that does not
support implict function declarations.

m4/progname.m4

index 031aba65cbf0cc7dc86ba6b598e63d61d78bb688..b1a80f7f28c628a8a520e90b8036c8224aa86cbe 100644 (file)
@@ -4,7 +4,7 @@
 AC_DEFUN([lldp_CHECK___PROGNAME],[
   AC_CACHE_CHECK([whether libc defines __progname], lldp_cv_check___progname, [
     AC_LINK_IFELSE([AC_LANG_PROGRAM(
-                     [[]],
+                     [[#include<stdio.h>]],
                      [[ extern char *__progname; printf("%s", __progname); ]])],
                      [ lldp_cv_check___progname="yes" ],
                      [ lldp_cv_check___progname="no" ])