]> git.ipfire.org Git - people/pmueller/ipfire-2.x.git/blob - src/patches/libarchive-3.6-fix-glibc-2.36-headers.patch
7c88ca1b1ca038fe3f5150b0b0e9e067ded32e60
[people/pmueller/ipfire-2.x.git] / src / patches / libarchive-3.6-fix-glibc-2.36-headers.patch
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 libarchive/archive_read_disk_posix.c | 5 ++---
17 1 file changed, 2 insertions(+), 3 deletions(-)
18
19 diff --git a/libarchive/archive_read_disk_posix.c b/libarchive/archive_read_disk_posix.c
20 index 2b39e672b..a96008db7 100644
21 --- a/libarchive/archive_read_disk_posix.c
22 +++ b/libarchive/archive_read_disk_posix.c
23 @@ -34,9 +34,6 @@ __FBSDID("$FreeBSD$");
24 #ifdef HAVE_SYS_PARAM_H
25 #include <sys/param.h>
26 #endif
27 -#ifdef HAVE_SYS_MOUNT_H
28 -#include <sys/mount.h>
29 -#endif
30 #ifdef HAVE_SYS_STAT_H
31 #include <sys/stat.h>
32 #endif
33 @@ -54,6 +51,8 @@ __FBSDID("$FreeBSD$");
34 #endif
35 #ifdef HAVE_LINUX_FS_H
36 #include <linux/fs.h>
37 +#elif HAVE_SYS_MOUNT_H
38 +#include <sys/mount.h>
39 #endif
40 /*
41 * Some Linux distributions have both linux/ext2_fs.h and ext2fs/ext2_fs.h.