[PATCH] fusermount: Fix the close_range ifdef
authorBernd Schubert <bernd@bsbernd.com>
Tue, 15 Jul 2025 21:54:27 +0000 (23:54 +0200)
committerLaszlo Boszormenyi (GCS) <gcs@debian.org>
Wed, 16 Jul 2025 17:27:21 +0000 (17:27 +0000)
This fixes commit 82bcd818
That commit had removed HAVE_LINUX_CLOSE_RANGE in meson generation,
but didn't remove the usage in fusermount.c - fusermount was then
not using the close_range syscall.

Closes: https://github.com/libfuse/libfuse/issues/1284
Signed-off-by: Bernd Schubert <bernd@bsbernd.com>
Gbp-Pq: Name Fix-the-close_range-ifdef.patch

util/fusermount.c

index da6d5f2bea1d920558bb26de63decb0a3c6db813..dbd947c605d47b5b9c9f0f17f7d32c360c46dc2e 100644 (file)
@@ -36,7 +36,7 @@
 #include <stdbool.h>
 #include <sys/vfs.h>
 
-#ifdef HAVE_LINUX_CLOSE_RANGE_H
+#ifdef HAVE_CLOSE_RANGE
 #include <linux/close_range.h>
 #endif
 
@@ -1477,7 +1477,7 @@ static int close_inherited_fds(int cfd)
        if (cfd <= STDERR_FILENO)
                return -EINVAL;
 
-#ifdef HAVE_LINUX_CLOSE_RANGE_H
+#ifdef HAVE_CLOSE_RANGE
        if (cfd < STDERR_FILENO + 2) {
                close_range_loop(STDERR_FILENO + 1, cfd - 1, cfd);
        } else {