aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBernd Schubert <bernd@bsbernd.com>2025-07-15 23:54:27 +0200
committerBernd Schubert <bernd@bsbernd.com>2025-07-16 10:44:28 +0200
commit194023c5999651386a3ddbf91fdd710d661d083b (patch)
tree0930f07d9e721940b295eb2afc93014dabc7027b
parentb507cbc2b1aaec1931642497edcb6723a0d24dc4 (diff)
downloadlibfuse-194023c5999651386a3ddbf91fdd710d661d083b.tar.gz
fusermount: Fix the close_range ifdef
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>
-rw-r--r--util/fusermount.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/util/fusermount.c b/util/fusermount.c
index 48f7fe7..1b94e8e 100644
--- a/util/fusermount.c
+++ b/util/fusermount.c
@@ -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
@@ -1451,7 +1451,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 {