summaryrefslogtreecommitdiffstats
path: root/src/utils/lib
diff options
context:
space:
mode:
authorSimon Rettberg2022-12-07 14:52:00 +0100
committerSimon Rettberg2022-12-07 14:52:00 +0100
commit2035f7c36c6d6769bee7a784c306d991ea44d6b3 (patch)
treef26dfc5328e03a4a968e310327ccf12cd9209022 /src/utils/lib
parentFix linter issues to satisfy Linux kernel code style (diff)
downloadxloop-2035f7c36c6d6769bee7a784c306d991ea44d6b3.tar.gz
xloop-2035f7c36c6d6769bee7a784c306d991ea44d6b3.tar.xz
xloop-2035f7c36c6d6769bee7a784c306d991ea44d6b3.zip
Don't use close_range as it might or might not collide with libc
We don't have anything in place to actually generate a correct config.h, so to avoid breaking either newer or older distros, don't use the offending syscall at all.
Diffstat (limited to 'src/utils/lib')
-rw-r--r--src/utils/lib/fileutils.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/src/utils/lib/fileutils.c b/src/utils/lib/fileutils.c
index 7a8fce2..373b420 100644
--- a/src/utils/lib/fileutils.c
+++ b/src/utils/lib/fileutils.c
@@ -186,10 +186,7 @@ int main(int argc, char *argv[])
ignore_result( dup(STDIN_FILENO) );
ignore_result( dup(STDIN_FILENO) );
-# ifdef HAVE_CLOSE_RANGE
- if (close_range(STDERR_FILENO + 1, ~0U, 0) < 0)
-# endif
- ul_close_all_fds(STDERR_FILENO + 1, ~0U);
+ ul_close_all_fds(STDERR_FILENO + 1, ~0U);
} else if (strcmp(argv[1], "--copy-file") == 0) {
int ret = ul_copy_file(STDIN_FILENO, STDOUT_FILENO);