diff options
-rw-r--r-- | meta/recipes-extended/libarchive/libarchive/0001-libarchive-Do-not-include-sys-mount.h-when-linux-fs..patch | 47 | ||||
-rw-r--r-- | meta/recipes-extended/libarchive/libarchive_3.6.1.bb | 4 |
2 files changed, 50 insertions, 1 deletions
diff --git a/meta/recipes-extended/libarchive/libarchive/0001-libarchive-Do-not-include-sys-mount.h-when-linux-fs..patch b/meta/recipes-extended/libarchive/libarchive/0001-libarchive-Do-not-include-sys-mount.h-when-linux-fs..patch new file mode 100644 index 0000000000..0d21799682 --- /dev/null +++ b/meta/recipes-extended/libarchive/libarchive/0001-libarchive-Do-not-include-sys-mount.h-when-linux-fs..patch | |||
@@ -0,0 +1,47 @@ | |||
1 | From a2f68263a1da5ad227bcb9cd8fa91b93c8b6c99f Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Mon, 25 Jul 2022 10:56:53 -0700 | ||
4 | Subject: [PATCH] libarchive: Do not include sys/mount.h when linux/fs.h is | ||
5 | present | ||
6 | |||
7 | These headers are in conflict and only one is needed by | ||
8 | archive_read_disk_posix.c therefore include linux/fs.h if it exists | ||
9 | otherwise include sys/mount.h | ||
10 | |||
11 | It also helps compiling with glibc 2.36 | ||
12 | where sys/mount.h conflicts with linux/mount.h see [1] | ||
13 | |||
14 | [1] https://sourceware.org/glibc/wiki/Release/2.36 | ||
15 | |||
16 | Upstream-Status: Submitted [https://github.com/libarchive/libarchive/pull/1761] | ||
17 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
18 | --- | ||
19 | libarchive/archive_read_disk_posix.c | 5 ++--- | ||
20 | 1 file changed, 2 insertions(+), 3 deletions(-) | ||
21 | |||
22 | diff --git a/libarchive/archive_read_disk_posix.c b/libarchive/archive_read_disk_posix.c | ||
23 | index 2b39e672..a96008db 100644 | ||
24 | --- a/libarchive/archive_read_disk_posix.c | ||
25 | +++ b/libarchive/archive_read_disk_posix.c | ||
26 | @@ -34,9 +34,6 @@ __FBSDID("$FreeBSD$"); | ||
27 | #ifdef HAVE_SYS_PARAM_H | ||
28 | #include <sys/param.h> | ||
29 | #endif | ||
30 | -#ifdef HAVE_SYS_MOUNT_H | ||
31 | -#include <sys/mount.h> | ||
32 | -#endif | ||
33 | #ifdef HAVE_SYS_STAT_H | ||
34 | #include <sys/stat.h> | ||
35 | #endif | ||
36 | @@ -54,6 +51,8 @@ __FBSDID("$FreeBSD$"); | ||
37 | #endif | ||
38 | #ifdef HAVE_LINUX_FS_H | ||
39 | #include <linux/fs.h> | ||
40 | +#elif HAVE_SYS_MOUNT_H | ||
41 | +#include <sys/mount.h> | ||
42 | #endif | ||
43 | /* | ||
44 | * Some Linux distributions have both linux/ext2_fs.h and ext2fs/ext2_fs.h. | ||
45 | -- | ||
46 | 2.25.1 | ||
47 | |||
diff --git a/meta/recipes-extended/libarchive/libarchive_3.6.1.bb b/meta/recipes-extended/libarchive/libarchive_3.6.1.bb index 761cfca647..24d7918bf9 100644 --- a/meta/recipes-extended/libarchive/libarchive_3.6.1.bb +++ b/meta/recipes-extended/libarchive/libarchive_3.6.1.bb | |||
@@ -32,7 +32,9 @@ PACKAGECONFIG[zstd] = "--with-zstd,--without-zstd,zstd," | |||
32 | 32 | ||
33 | EXTRA_OECONF += "--enable-largefile" | 33 | EXTRA_OECONF += "--enable-largefile" |
34 | 34 | ||
35 | SRC_URI = "http://libarchive.org/downloads/libarchive-${PV}.tar.gz" | 35 | SRC_URI = "http://libarchive.org/downloads/libarchive-${PV}.tar.gz \ |
36 | file://0001-libarchive-Do-not-include-sys-mount.h-when-linux-fs..patch \ | ||
37 | " | ||
36 | UPSTREAM_CHECK_URI = "http://libarchive.org/" | 38 | UPSTREAM_CHECK_URI = "http://libarchive.org/" |
37 | 39 | ||
38 | SRC_URI[sha256sum] = "c676146577d989189940f1959d9e3980d28513d74eedfbc6b7f15ea45fe54ee2" | 40 | SRC_URI[sha256sum] = "c676146577d989189940f1959d9e3980d28513d74eedfbc6b7f15ea45fe54ee2" |