From 216dfdf4fffe533042a55371c11c97115a917566 Mon Sep 17 00:00:00 2001 From: Florian Weimer Date: Thu, 2 Feb 2023 09:47:02 +0100 Subject: [PATCH] Port configure script to C99 Related to: --- patch-configure-c99.patch | 31 +++++++++++++++++++++++++++++++ patch.spec | 7 ++++++- 2 files changed, 37 insertions(+), 1 deletion(-) create mode 100644 patch-configure-c99.patch diff --git a/patch-configure-c99.patch b/patch-configure-c99.patch new file mode 100644 index 0000000..2db52fb --- /dev/null +++ b/patch-configure-c99.patch @@ -0,0 +1,31 @@ +Avoid an implicit declaration of mkdir in the fchownat probe. Fixed +in gnulib upstream via: + +commit 3c136a2cc38d71083f123231a8b9ad4b01930789 +Author: Bruno Haible +Date: Thu Jan 24 23:51:11 2019 +0100 + + fchownat: Fix compilation error on Android 4.3. + + * lib/unistd.in.h: Include when module 'fchownat' is in + use. + * m4/fchownat.m4 (gl_FUNC_FCHOWNAT_DEREF_BUG, + gl_FUNC_FCHOWNAT_EMPTY_FILENAME_BUG): Include also . + * doc/posix-functions/fchownat.texi: Mention the issue. + +The patched filed is not included in the upstream Git repository for +patch, so presumably the next upstream release will sync the file from +gnulib and get the fix this way. + +diff --git a/m4/fchownat.m4 b/m4/fchownat.m4 +index 54c670c7037246a4..b1a1287f80c297a0 100644 +--- a/m4/fchownat.m4 ++++ b/m4/fchownat.m4 +@@ -86,6 +86,7 @@ AC_DEFUN([gl_FUNC_FCHOWNAT_EMPTY_FILENAME_BUG], + [AC_LANG_PROGRAM( + [[#include + #include ++ #include + ]], + [[int fd; + int ret; diff --git a/patch.spec b/patch.spec index cdf9e1d..3227e3a 100644 --- a/patch.spec +++ b/patch.spec @@ -3,7 +3,7 @@ Summary: Utility for modifying/upgrading files Name: patch Version: 2.7.6 -Release: 18%{?dist} +Release: 19%{?dist} License: GPLv3+ URL: https://savannah.gnu.org/projects/patch/ Source: https://ftp.gnu.org/gnu/patch/patch-%{version}.tar.xz @@ -32,6 +32,7 @@ Patch21: patch-2.7.6-avoid-invalid-memory-access-in-context-format-diffs.patch Patch22: patch-2.7.6-CVE-2018-17942.patch Patch23: patch-2.7.6-failed_assertion.patch Patch100: patch-selinux.patch +Patch101: patch-configure-c99.patch BuildRequires: make BuildRequires: gcc @@ -84,6 +85,7 @@ applications. %patch23 -p1 -b .failed_assertion # SELinux support. %patch100 -p1 -b .selinux +%patch101 -p1 %build CFLAGS="$RPM_OPT_FLAGS -D_GNU_SOURCE" @@ -107,6 +109,9 @@ make check %{_mandir}/*/* %changelog +* Thu Feb 02 2023 Florian Weimer - 2.7.6-19 +- Port configure script to C99 + * Thu Jan 19 2023 Fedora Release Engineering - 2.7.6-18 - Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild