From c02ba34822ec0bb5f66b4e214f95229e3a40ddf9 Mon Sep 17 00:00:00 2001 From: Marcin Krol Date: Wed, 6 Dec 2023 21:04:47 +0100 Subject: [PATCH] - fix build with recent glibc --- rpm.spec | 2 ++ statver.patch | 20 ++++++++++++++++++++ 2 files changed, 22 insertions(+) create mode 100644 statver.patch diff --git a/rpm.spec b/rpm.spec index acf37a3..9d5aa5b 100644 --- a/rpm.spec +++ b/rpm.spec @@ -152,6 +152,7 @@ Patch118: %{name}-noarch-subpackages.patch Patch119: %{name}-div0.patch Patch120: %{name}-pythondeps.patch Patch121: %{name}-tld-macros.patch +Patch122: statver.patch URL: http://rpm5.org/ BuildRequires: autoconf >= 2.57 BuildRequires: automake >= 1.4 @@ -738,6 +739,7 @@ install %{SOURCE13} scripts/perl.prov %patch119 -p1 %patch120 -p1 %patch121 -p1 +%patch122 -p1 mv -f po/{sr,sr@Latn}.po rm -rf sqlite zlib popt diff --git a/statver.patch b/statver.patch new file mode 100644 index 0000000..6a4356b --- /dev/null +++ b/statver.patch @@ -0,0 +1,20 @@ +diff -ur rpm-4.5.orig/rpmio/fts.c rpm-4.5/rpmio/fts.c +--- rpm-4.5.orig/rpmio/fts.c 2008-06-10 01:19:25.000000000 +0200 ++++ rpm-4.5/rpmio/fts.c 2023-12-06 21:01:08.527372354 +0100 +@@ -80,6 +80,16 @@ + # define __fchdir fchdir + #endif + ++#ifndef _STAT_VER ++#if defined (__aarch64__) ++#define _STAT_VER 0 ++#elif defined (__x86_64__) ++#define _STAT_VER 1 ++#else ++#define _STAT_VER 3 ++#endif ++#endif ++ + #if !defined(USHRT_MAX) + #define USHRT_MAX 65535 + #endif -- 2.46.0