diff --git a/libbsd-configure-c99.patch b/libbsd-configure-c99.patch new file mode 100644 index 0000000..631d303 --- /dev/null +++ b/libbsd-configure-c99.patch @@ -0,0 +1,24 @@ +configure.ac: Improve C99 compatibility of __progname check + +The check uses printf, so it needs to include for compilers +which do not support implicit function declarations. (They were +removed from C99.) + +Submitted upstream: + + + +diff -ur libbsd-0.11.7.orig/configure.ac libbsd-0.11.7/configure.ac +--- libbsd-0.11.7.orig/configure.ac 2022-10-06 04:06:31.000000000 +0200 ++++ libbsd-0.11.7/configure.ac 2022-12-12 10:00:57.500065200 +0100 +@@ -221,7 +221,9 @@ + + AC_MSG_CHECKING([for __progname]) + AC_LINK_IFELSE( +- [AC_LANG_PROGRAM([[extern char *__progname;]], ++ [AC_LANG_PROGRAM([[ ++ #include ++ extern char *__progname;]], + [[printf("%s", __progname);]])], + [AC_DEFINE([HAVE___PROGNAME], [1], [Define to 1 if you have __progname]) + AC_MSG_RESULT([yes])], diff --git a/libbsd.spec b/libbsd.spec index 43e1bd2..85b6676 100644 --- a/libbsd.spec +++ b/libbsd.spec @@ -1,6 +1,6 @@ Name: libbsd Version: 0.11.7 -Release: 2%{?dist} +Release: 3%{?dist} Summary: Library providing BSD-compatible functions for portability URL: https://libbsd.freedesktop.org/ # Breakdown in COPYING file of libbsd release tarball, see also: @@ -13,6 +13,7 @@ Source1: https://libbsd.freedesktop.org/releases/libbsd-%{version}.tar.xz Source2: https://keys.openpgp.org/vks/v1/by-fingerprint/4F3E74F436050C10F5696574B972BF3EA4AE57A3 # https://gitlab.freedesktop.org/libbsd/libbsd/-/issues/14: Revert breaking commit in explicit_bzero test Patch0: https://gitlab.freedesktop.org/libbsd/libbsd/-/commit/d5865759f8698f1c75339451a26fa3ae00276a51.patch#/libbsd-0.11.7-test-explicit_bzero.patch +Patch1: libbsd-configure-c99.patch BuildRequires: autoconf BuildRequires: automake @@ -51,6 +52,7 @@ configured using "pkg-config --libs libbsd-ctor". %setup -q %{gpgverify} --keyring='%{SOURCE2}' --signature='%{SOURCE1}' --data='%{SOURCE0}' %patch0 -p1 -R -b .test-explicit_bzero +%patch1 -p1 -b .c99 %build autoreconf -fiv @@ -91,6 +93,9 @@ rm %{buildroot}%{_mandir}/man3/explicit_bzero.3bsd %{_libdir}/pkgconfig/%{name}-ctor.pc %changelog +* Mon Dec 12 2022 Florian Weimer - 0.11.7-3 +- Port configure script to C99 + * Sun Dec 04 2022 Mikel Olasagasti Uranga - 0.11.7-2 - Add runtime requirement on libmd-devel to libbsd-devel (#2148612)