diff options
Diffstat (limited to 'meta-filesystems/recipes-support')
-rw-r--r-- | meta-filesystems/recipes-support/fuse/files/fuse2-0007-util-ulockmgr_server.c-conditionally-define-closefro.patch | 51 | ||||
-rw-r--r-- | meta-filesystems/recipes-support/fuse/fuse_2.9.9.bb | 1 |
2 files changed, 52 insertions, 0 deletions
diff --git a/meta-filesystems/recipes-support/fuse/files/fuse2-0007-util-ulockmgr_server.c-conditionally-define-closefro.patch b/meta-filesystems/recipes-support/fuse/files/fuse2-0007-util-ulockmgr_server.c-conditionally-define-closefro.patch new file mode 100644 index 000000000..3607304e0 --- /dev/null +++ b/meta-filesystems/recipes-support/fuse/files/fuse2-0007-util-ulockmgr_server.c-conditionally-define-closefro.patch | |||
@@ -0,0 +1,51 @@ | |||
1 | From: Sam James <sam@gentoo.org> | ||
2 | Date: Sat, 24 Jul 2021 22:02:45 +0100 | ||
3 | Subject: [PATCH] util/ulockmgr_server.c: conditionally define closefrom (fix | ||
4 | glibc-2.34+) | ||
5 | |||
6 | closefrom(3) has joined us in glibc-land from *BSD and Solaris. Since | ||
7 | it's available in glibc 2.34+, we want to detect it and only define our | ||
8 | fallback if the libc doesn't provide it. | ||
9 | |||
10 | Bug: https://bugs.gentoo.org/803923 | ||
11 | Signed-off-by: Sam James <sam@gentoo.org> | ||
12 | |||
13 | --- a/configure.ac | ||
14 | +++ b/configure.ac | ||
15 | @@ -55,6 +55,7 @@ fi | ||
16 | |||
17 | AC_CHECK_FUNCS([fork setxattr fdatasync splice vmsplice utimensat]) | ||
18 | AC_CHECK_FUNCS([posix_fallocate]) | ||
19 | +AC_CHECK_FUNCS([closefrom]) | ||
20 | AC_CHECK_MEMBERS([struct stat.st_atim]) | ||
21 | AC_CHECK_MEMBERS([struct stat.st_atimespec]) | ||
22 | |||
23 | --- a/util/ulockmgr_server.c | ||
24 | +++ b/util/ulockmgr_server.c | ||
25 | @@ -22,6 +22,10 @@ | ||
26 | #include <sys/socket.h> | ||
27 | #include <sys/wait.h> | ||
28 | |||
29 | +#ifdef HAVE_CONFIG_H | ||
30 | + #include "config.h" | ||
31 | +#endif | ||
32 | + | ||
33 | struct message { | ||
34 | unsigned intr : 1; | ||
35 | unsigned nofd : 1; | ||
36 | @@ -124,6 +128,7 @@ static int receive_message(int sock, voi | ||
37 | return res; | ||
38 | } | ||
39 | |||
40 | +#if !defined(HAVE_CLOSEFROM) | ||
41 | static int closefrom(int minfd) | ||
42 | { | ||
43 | DIR *dir = opendir("/proc/self/fd"); | ||
44 | @@ -141,6 +146,7 @@ static int closefrom(int minfd) | ||
45 | } | ||
46 | return 0; | ||
47 | } | ||
48 | +#endif | ||
49 | |||
50 | static void send_reply(int cfd, struct message *msg) | ||
51 | { | ||
diff --git a/meta-filesystems/recipes-support/fuse/fuse_2.9.9.bb b/meta-filesystems/recipes-support/fuse/fuse_2.9.9.bb index 2c272d452..64414305e 100644 --- a/meta-filesystems/recipes-support/fuse/fuse_2.9.9.bb +++ b/meta-filesystems/recipes-support/fuse/fuse_2.9.9.bb | |||
@@ -14,6 +14,7 @@ SRC_URI = "https://github.com/libfuse/libfuse/releases/download/${BP}/${BP}.tar. | |||
14 | file://gold-unversioned-symbol.patch \ | 14 | file://gold-unversioned-symbol.patch \ |
15 | file://aarch64.patch \ | 15 | file://aarch64.patch \ |
16 | file://0001-fuse-fix-the-return-value-of-help-option.patch \ | 16 | file://0001-fuse-fix-the-return-value-of-help-option.patch \ |
17 | file://fuse2-0007-util-ulockmgr_server.c-conditionally-define-closefro.patch \ | ||
17 | file://fuse.conf \ | 18 | file://fuse.conf \ |
18 | " | 19 | " |
19 | SRC_URI[md5sum] = "8000410aadc9231fd48495f7642f3312" | 20 | SRC_URI[md5sum] = "8000410aadc9231fd48495f7642f3312" |