distribution/packages/devel/fakeroot/patches/fakeroot-002-stat-ver-undefined.patch

57 lines
1.9 KiB
Diff
Raw Normal View History

2022-09-16 02:34:00 +00:00
From f6ca3217ec2fad93d078fa0121aa8f88d7d12ccb Mon Sep 17 00:00:00 2001
From: lualiliu <lualiliu@outlook.com>
Date: Wed, 7 Sep 2022 10:57:49 +0800
Subject: [PATCH] Add a patch about fakeroot(_STAT_VER undeclared)
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
solve it:
libfakeroot.c:99:40: error: _STAT_VER undeclared (first use in this
function)
---
...fine-_STAT_VER-if-not-already-define.patch | 34 +++++++++++++++++++
1 file changed, 34 insertions(+)
create mode 100644 packages/devel/fakeroot/patches/0001-libfakeroot.c-define-_STAT_VER-if-not-already-define.patch
diff --git a/packages/devel/fakeroot/patches/0001-libfakeroot.c-define-_STAT_VER-if-not-already-define.patch b/packages/devel/fakeroot/patches/0001-libfakeroot.c-define-_STAT_VER-if-not-already-define.patch
new file mode 100644
index 00000000..613d0c95
--- /dev/null
+++ b/packages/devel/fakeroot/patches/0001-libfakeroot.c-define-_STAT_VER-if-not-already-define.patch
@@ -0,0 +1,34 @@
+From ca68c7336dea4a07cf5b77c1fdc9e9aee4984ca5 Mon Sep 17 00:00:00 2001
+From: Ilya Lipnitskiy <ilya.lipnitskiy@gmail.com>
+Date: Thu, 11 Feb 2021 20:59:25 -0800
+Subject: [PATCH 1/3] libfakeroot.c: define _STAT_VER if not already defined
+
+Signed-off-by: Ilya Lipnitskiy <ilya.lipnitskiy@gmail.com>
+---
+ libfakeroot.c | 10 ++++++++++
+ 1 file changed, 10 insertions(+)
+
+diff --git a/libfakeroot.c b/libfakeroot.c
+index 3e80e38..14cdbc4 100644
+--- a/libfakeroot.c
++++ b/libfakeroot.c
+@@ -90,6 +90,16 @@
+ #define SEND_GET_XATTR64(a,b,c) send_get_xattr64(a,b)
+ #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
++
+ /*
+ These INT_* (which stands for internal) macros should always be used when
+ the fakeroot library owns the storage of the stat variable.
+--
+2.30.1
+