1 |
commit: f1c864205d96d4c513341ab7b21f48fe3fa19a81 |
2 |
Author: Sam James <sam <AT> gentoo <DOT> org> |
3 |
AuthorDate: Wed Aug 3 02:22:15 2022 +0000 |
4 |
Commit: Sam James <sam <AT> gentoo <DOT> org> |
5 |
CommitDate: Wed Aug 3 02:25:03 2022 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f1c86420 |
7 |
|
8 |
app-arch/libarchive: fix build w/ glibc 2.36 |
9 |
|
10 |
Closes: https://bugs.gentoo.org/863227 |
11 |
Signed-off-by: Sam James <sam <AT> gentoo.org> |
12 |
|
13 |
.../files/libarchive-3.6.1-glibc-2.36.patch | 39 ++++++++++++++++++++++ |
14 |
app-arch/libarchive/libarchive-3.6.1.ebuild | 4 +++ |
15 |
2 files changed, 43 insertions(+) |
16 |
|
17 |
diff --git a/app-arch/libarchive/files/libarchive-3.6.1-glibc-2.36.patch b/app-arch/libarchive/files/libarchive-3.6.1-glibc-2.36.patch |
18 |
new file mode 100644 |
19 |
index 000000000000..e45d891e2a17 |
20 |
--- /dev/null |
21 |
+++ b/app-arch/libarchive/files/libarchive-3.6.1-glibc-2.36.patch |
22 |
@@ -0,0 +1,39 @@ |
23 |
+https://github.com/libarchive/libarchive/pull/1761 |
24 |
+https://bugs.gentoo.org/863227 |
25 |
+ |
26 |
+From a2f68263a1da5ad227bcb9cd8fa91b93c8b6c99f Mon Sep 17 00:00:00 2001 |
27 |
+From: Khem Raj <raj.khem@×××××.com> |
28 |
+Date: Mon, 25 Jul 2022 10:56:53 -0700 |
29 |
+Subject: [PATCH] libarchive: Do not include sys/mount.h when linux/fs.h is |
30 |
+ present |
31 |
+ |
32 |
+These headers are in conflict and only one is needed by |
33 |
+archive_read_disk_posix.c therefore include linux/fs.h if it exists |
34 |
+otherwise include sys/mount.h |
35 |
+ |
36 |
+It also helps compiling with glibc 2.36 |
37 |
+where sys/mount.h conflicts with linux/mount.h see [1] |
38 |
+ |
39 |
+[1] https://sourceware.org/glibc/wiki/Release/2.36 |
40 |
+--- a/libarchive/archive_read_disk_posix.c |
41 |
++++ b/libarchive/archive_read_disk_posix.c |
42 |
+@@ -34,9 +34,6 @@ __FBSDID("$FreeBSD$"); |
43 |
+ #ifdef HAVE_SYS_PARAM_H |
44 |
+ #include <sys/param.h> |
45 |
+ #endif |
46 |
+-#ifdef HAVE_SYS_MOUNT_H |
47 |
+-#include <sys/mount.h> |
48 |
+-#endif |
49 |
+ #ifdef HAVE_SYS_STAT_H |
50 |
+ #include <sys/stat.h> |
51 |
+ #endif |
52 |
+@@ -54,6 +51,8 @@ __FBSDID("$FreeBSD$"); |
53 |
+ #endif |
54 |
+ #ifdef HAVE_LINUX_FS_H |
55 |
+ #include <linux/fs.h> |
56 |
++#elif HAVE_SYS_MOUNT_H |
57 |
++#include <sys/mount.h> |
58 |
+ #endif |
59 |
+ /* |
60 |
+ * Some Linux distributions have both linux/ext2_fs.h and ext2fs/ext2_fs.h. |
61 |
+ |
62 |
|
63 |
diff --git a/app-arch/libarchive/libarchive-3.6.1.ebuild b/app-arch/libarchive/libarchive-3.6.1.ebuild |
64 |
index 41cfc71f5a04..dbe62127a118 100644 |
65 |
--- a/app-arch/libarchive/libarchive-3.6.1.ebuild |
66 |
+++ b/app-arch/libarchive/libarchive-3.6.1.ebuild |
67 |
@@ -45,6 +45,10 @@ BDEPEND=" |
68 |
verify-sig? ( sec-keys/openpgp-keys-libarchive ) |
69 |
" |
70 |
|
71 |
+PATCHES=( |
72 |
+ "${FILESDIR}"/${P}-glibc-2.36.patch |
73 |
+) |
74 |
+ |
75 |
multilib_src_configure() { |
76 |
export ac_cv_header_ext2fs_ext2_fs_h=$(usex e2fsprogs) #354923 |