From 4cd5863af81b53d049ff052e3364c04964cdbdee Mon Sep 17 00:00:00 2001 From: jchzhou Date: Thu, 14 Mar 2024 12:29:26 +0800 Subject: [PATCH] backport a patch for fixing clang building issues Signed-off-by: jchzhou --- ...e-needed-header-for-major-minor-macr.patch | 44 +++++++++++++++++++ cpio.spec | 10 ++++- 2 files changed, 53 insertions(+), 1 deletion(-) create mode 100644 backport-configure-Include-needed-header-for-major-minor-macr.patch diff --git a/backport-configure-Include-needed-header-for-major-minor-macr.patch b/backport-configure-Include-needed-header-for-major-minor-macr.patch new file mode 100644 index 0000000..3c13319 --- /dev/null +++ b/backport-configure-Include-needed-header-for-major-minor-macr.patch @@ -0,0 +1,44 @@ +From 8179be21e664cedb2e9d238cc2f6d04965e97275 Mon Sep 17 00:00:00 2001 +From: Sergey Poznyakoff +Date: Thu, 11 May 2023 10:18:44 +0300 +Subject: [PATCH] configure: Include needed header for major/minor macros + +This helps in avoiding the warning about implicit function declaration +which is elevated as error with newer compilers e.g. clang 16 + +Signed-off-by: Khem Raj +--- + configure.ac | 18 ++++++++++++++++-- + 1 file changed, 16 insertions(+), 2 deletions(-) + +diff --git a/configure.ac b/configure.ac +index de479e7..c601029 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -43,8 +43,22 @@ AC_TYPE_UID_T + AC_CHECK_TYPE(gid_t, int) + + AC_HEADER_DIRENT +-AX_COMPILE_CHECK_RETTYPE([major], [0]) +-AX_COMPILE_CHECK_RETTYPE([minor], [0]) ++AX_COMPILE_CHECK_RETTYPE([major], [0], [ ++#include ++#ifdef MAJOR_IN_MKDEV ++# include ++#endif ++#ifdef MAJOR_IN_SYSMACROS ++# include ++#endif]) ++AX_COMPILE_CHECK_RETTYPE([minor], [0], [ ++#include ++#ifdef MAJOR_IN_MKDEV ++# include ++#endif ++#ifdef MAJOR_IN_SYSMACROS ++# include ++#endif]) + + AC_CHECK_FUNCS([fchmod fchown]) + # This is needed for mingw build +-- +2.34.1 diff --git a/cpio.spec b/cpio.spec index ba21910..26f94ec 100644 --- a/cpio.spec +++ b/cpio.spec @@ -1,6 +1,6 @@ Name: cpio Version: 2.14 -Release: 3 +Release: 4 Summary: A GNU archiving program License: GPLv3+ @@ -17,6 +17,8 @@ Patch6: cpio-2.11-crc-fips-nit.patch Patch7: backport-restore-access-and-modification-times-of-symlinks.patch Patch8: backport-fix-operation-of-no-absolute-filenames-make-director.patch Patch9: backport-Do-not-set-exit-code-to-2-when-failing-to-create-symlink.patch +# https://git.savannah.gnu.org/cgit/cpio.git/commit/?id=8179be21e664cedb2e9d238cc2f6d04965e97275 +Patch10: backport-configure-Include-needed-header-for-major-minor-macr.patch Patch9000: add-option-to-add-metadata-in-copy-out-mode.patch Patch9001: Fix-use-after-free-and-return-appropriate-error.patch @@ -62,6 +64,12 @@ make check %{_datadir}/man/man1/%{name}.1.gz %changelog +* Thu Mar 14 2024 jchzhou - 2.14-4 +- Type:bugfix +- ID:NA +- SUG:NA +- DESC:backport a patch for fixing clang building issues + * Mon Aug 21 2023 fuanan - 2.14-3 - Type:CVE - ID:CVE-2015-1197 -- Gitee