Florian Weimer 2022-12-08 13:07:01 +01:00
parent f8e69988b0
commit 143870e535
2 changed files with 39 additions and 2 deletions

33
lldpd-configure-c99.patch Normal file
View File

@ -0,0 +1,33 @@
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" ])

View File

@ -10,7 +10,7 @@
Name: lldpd Name: lldpd
Version: 1.0.4 Version: 1.0.4
Release: 10%{?dist} Release: 11%{?dist}
Summary: ISC-licensed implementation of LLDP Summary: ISC-licensed implementation of LLDP
License: ISC License: ISC
@ -21,6 +21,7 @@ Source2: %{name}-tmpfiles
Source3: %{name}-fedora.sysconfig Source3: %{name}-fedora.sysconfig
Source4: %{name}-el6.init Source4: %{name}-el6.init
Source5: %{name}-el7.service Source5: %{name}-el7.service
Patch0: lldpd-configure-c99.patch
BuildRequires: gcc BuildRequires: gcc
BuildRequires: readline-devel BuildRequires: readline-devel
@ -62,7 +63,7 @@ Summary: %{summary}
%{name} development libraries and headers %{name} development libraries and headers
%prep %prep
%autosetup %autosetup -p1
%build %build
@ -173,6 +174,9 @@ fi
%changelog %changelog
* Thu Dec 8 2022 Florian Weimer <fweimer@redhat.com> - 1.0.4-11
- Port configure script to C99
* Thu Jul 21 2022 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.4-10 * Thu Jul 21 2022 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.4-10
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild - Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild