fuse: fix build against glibc 2.34
This commit is contained in:
parent
171ab48807
commit
847bf0cf75
@ -1,5 +1,6 @@
|
|||||||
untrusted comment: verify with /etc/ports/opt.pub
|
untrusted comment: verify with /etc/ports/opt.pub
|
||||||
RWSE3ohX2g5d/Qf/LBd/BG0lyzhQir5Elja8AE6fjnMbDxSq6Fsmv9PDywfdbPjgFAZlFHdv6dVo+NQd+2BCG6/U3PP0D4LwkA8=
|
RWSE3ohX2g5d/bBbAkIVUetOhw6o+QEPpSLhFJvUiBCEh3kSJuSSZ9gOXItaKkGOKsZzqeWtcxaJ4yVpRrAYUi1apFkN3IopuAw=
|
||||||
SHA256 (Pkgfile) = 4118553214bd71df5ba15ddb8b1badf7389d704ef3975a0e064cbe66299a2190
|
SHA256 (Pkgfile) = 91e93054fbfba3fef08c2412a5856118b78f87ad2fc2ab54a1a4962b02b3ea19
|
||||||
SHA256 (.footprint) = 596414448e63223d87bffe74553cae70f96ebbc677042a10a7d5896e9fef530a
|
SHA256 (.footprint) = 596414448e63223d87bffe74553cae70f96ebbc677042a10a7d5896e9fef530a
|
||||||
SHA256 (fuse-2.9.9.tar.gz) = d0e69d5d608cc22ff4843791ad097f554dd32540ddc9bed7638cc6fea7c1b4b5
|
SHA256 (fuse-2.9.9.tar.gz) = d0e69d5d608cc22ff4843791ad097f554dd32540ddc9bed7638cc6fea7c1b4b5
|
||||||
|
SHA256 (fuse2-0007-util-ulockmgr_server.c-conditionally-define-closefro.patch) = af2e8c783bca37bb9e34ff6f9f93c190922f8b9e83334496fbceaa4a8d27690d
|
||||||
|
12
fuse/Pkgfile
12
fuse/Pkgfile
@ -5,11 +5,19 @@
|
|||||||
name=fuse
|
name=fuse
|
||||||
version=2.9.9
|
version=2.9.9
|
||||||
release=1
|
release=1
|
||||||
source=(https://github.com/libfuse/libfuse/releases/download/$name-$version/$name-$version.tar.gz)
|
source=(https://github.com/libfuse/libfuse/releases/download/$name-$version/$name-$version.tar.gz
|
||||||
|
fuse2-0007-util-ulockmgr_server.c-conditionally-define-closefro.patch)
|
||||||
|
|
||||||
build() {
|
build() {
|
||||||
cd $name-$version
|
cd $name-$version
|
||||||
./configure --prefix=/usr
|
patch -Np1 -i $SRC/fuse2-0007-util-ulockmgr_server.c-conditionally-define-closefro.patch
|
||||||
|
autoreconf -vfi
|
||||||
|
UDEV_RULES_PATH=/usr/lib/udev/rules.d ./configure \
|
||||||
|
--prefix=/usr \
|
||||||
|
--libdir=/usr/lib \
|
||||||
|
--enable-lib \
|
||||||
|
--enable-util \
|
||||||
|
--disable-example
|
||||||
make
|
make
|
||||||
make DESTDIR=$PKG install
|
make DESTDIR=$PKG install
|
||||||
rm -r $PKG/{dev,etc}
|
rm -r $PKG/{dev,etc}
|
||||||
|
@ -0,0 +1,55 @@
|
|||||||
|
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>
|
||||||
|
|
||||||
|
diff --git a/configure.ac b/configure.ac
|
||||||
|
index 9946a0e..a2d481a 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 273c7d9..a04dac5 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)
|
||||||
|
{
|
Loading…
x
Reference in New Issue
Block a user