diff --git a/lldpd-configure-c99.patch b/lldpd-configure-c99.patch new file mode 100644 index 0000000..89be8e6 --- /dev/null +++ b/lldpd-configure-c99.patch @@ -0,0 +1,33 @@ +Include 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: + +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 + 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 ], + [ extern char *__progname; printf("%s", __progname); ], + [ lldp_cv_check___progname="yes" ], + [ lldp_cv_check___progname="no" ]) diff --git a/lldpd.spec b/lldpd.spec index 097f336..c7a8fbc 100644 --- a/lldpd.spec +++ b/lldpd.spec @@ -10,7 +10,7 @@ Name: lldpd Version: 1.0.4 -Release: 10%{?dist} +Release: 11%{?dist} Summary: ISC-licensed implementation of LLDP License: ISC @@ -21,6 +21,7 @@ Source2: %{name}-tmpfiles Source3: %{name}-fedora.sysconfig Source4: %{name}-el6.init Source5: %{name}-el7.service +Patch0: lldpd-configure-c99.patch BuildRequires: gcc BuildRequires: readline-devel @@ -62,7 +63,7 @@ Summary: %{summary} %{name} development libraries and headers %prep -%autosetup +%autosetup -p1 %build @@ -173,6 +174,9 @@ fi %changelog +* Thu Dec 8 2022 Florian Weimer - 1.0.4-11 +- Port configure script to C99 + * Thu Jul 21 2022 Fedora Release Engineering - 1.0.4-10 - Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild