]> git.pld-linux.org Git - packages/libfuse.git/commitdiff
Rel 3; fix build with newer glibc master auto/th/libfuse-2.9.9-3
authorArkadiusz Miśkiewicz <arekm@maven.pl>
Mon, 19 Dec 2022 06:11:55 +0000 (07:11 +0100)
committerArkadiusz Miśkiewicz <arekm@maven.pl>
Mon, 19 Dec 2022 06:11:55 +0000 (07:11 +0100)
fuse-2.9.9-closefrom-glibc-2-34.patch [new file with mode: 0644]
libfuse.spec

diff --git a/fuse-2.9.9-closefrom-glibc-2-34.patch b/fuse-2.9.9-closefrom-glibc-2-34.patch
new file mode 100644 (file)
index 0000000..beb8d51
--- /dev/null
@@ -0,0 +1,60 @@
+From ae2352bca9b4e607538412da0cc2a9625cd8b692 Mon Sep 17 00:00:00 2001
+From: Sam James <sam@gentoo.org>
+Date: Sat, 24 Jul 2021 22:02:45 +0100
+Subject: [PATCH] util/ulockmgr_server.c: conditionally define closefrom (fix
+ glibc-2.34+)
+
+closefrom(3) has joined us in glibc-land from *BSD and Solaris. Since
+it's available in glibc 2.34+, we want to detect it and only define our
+fallback if the libc doesn't provide it.
+
+Bug: https://bugs.gentoo.org/803923
+Signed-off-by: Sam James <sam@gentoo.org>
+---
+ configure.ac           | 1 +
+ util/ulockmgr_server.c | 6 ++++++
+ 2 files changed, 7 insertions(+)
+
+diff --git a/configure.ac b/configure.ac
+index 9946a0efa..a2d481aa9 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -55,6 +55,7 @@ fi
+ AC_CHECK_FUNCS([fork setxattr fdatasync splice vmsplice utimensat])
+ AC_CHECK_FUNCS([posix_fallocate])
++AC_CHECK_FUNCS([closefrom])
+ AC_CHECK_MEMBERS([struct stat.st_atim])
+ AC_CHECK_MEMBERS([struct stat.st_atimespec])
+diff --git a/util/ulockmgr_server.c b/util/ulockmgr_server.c
+index 273c7d923..a04dac5c6 100644
+--- a/util/ulockmgr_server.c
++++ b/util/ulockmgr_server.c
+@@ -22,6 +22,10 @@
+ #include <sys/socket.h>
+ #include <sys/wait.h>
++#ifdef HAVE_CONFIG_H
++      #include "config.h"
++#endif
++
+ struct message {
+       unsigned intr : 1;
+       unsigned nofd : 1;
+@@ -124,6 +128,7 @@ static int receive_message(int sock, void *buf, size_t buflen, int *fdp,
+       return res;
+ }
++#if !defined(HAVE_CLOSEFROM)
+ static int closefrom(int minfd)
+ {
+       DIR *dir = opendir("/proc/self/fd");
+@@ -141,6 +146,7 @@ static int closefrom(int minfd)
+       }
+       return 0;
+ }
++#endif
+ static void send_reply(int cfd, struct message *msg)
+ {
index b56a152feb88a9330812ce877d431783ccc2cff3..cbbe50f5e3746848704d97abd14b7b61de161651 100644 (file)
@@ -2,7 +2,7 @@ Summary:        Filesystem in Userspace
 Summary(pl.UTF-8):     System plików w przestrzeni użytkownika
 Name:          libfuse
 Version:       2.9.9
-Release:       2
+Release:       3
 License:       LGPL v2 (library), GPL v2 (tools)
 Group:         Applications/System
 #Source0Download: https://github.com/libfuse/libfuse/releases
@@ -10,6 +10,7 @@ Source0:      https://github.com/libfuse/libfuse/releases/download/fuse-%{version}/fu
 # Source0-md5: 8000410aadc9231fd48495f7642f3312
 Patch0:                kernel-misc-fuse-Makefile.am.patch
 Patch1:                %{name}-arm64.patch
+Patch2:         fuse-2.9.9-closefrom-glibc-2-34.patch
 URL:           https://github.com/libfuse/libfuse
 BuildRequires: autoconf >= 2.60
 BuildRequires: automake
@@ -94,6 +95,7 @@ Narzędzia do montowania systemów plików opartych na FUSE.
 %setup -q -n fuse-%{version}
 %patch0 -p1
 %patch1 -p1
+%patch2 -p1
 
 sed -i '/FUSERMOUNT_PROG/s,fusermount,%{_bindir}/fusermount,' lib/mount.c
 
This page took 0.191454 seconds and 4 git commands to generate.