summaryrefslogtreecommitdiffstats
path: root/src/utils/include/fileutils.h
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/include/fileutils.h
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/include/fileutils.h')
-rw-r--r--src/utils/include/fileutils.h14
1 files changed, 0 insertions, 14 deletions
diff --git a/src/utils/include/fileutils.h b/src/utils/include/fileutils.h
index 17ad429..552f550 100644
--- a/src/utils/include/fileutils.h
+++ b/src/utils/include/fileutils.h
@@ -77,20 +77,6 @@ static inline struct dirent *xreaddir(DIR *dp)
return d;
}
-#if defined(__linux__)
-# include <sys/syscall.h>
-# if defined(SYS_close_range)
-# include <sys/types.h>
-# ifndef HAVE_CLOSE_RANGE
-static inline int close_range(unsigned int first, unsigned int last, int flags)
-{
- return syscall(SYS_close_range, first, last, flags);
-}
-# endif
-# define HAVE_CLOSE_RANGE 1
-# endif /* SYS_close_range */
-#endif /* __linux__ */
-
extern void ul_close_all_fds(unsigned int first, unsigned int last);
#define UL_COPY_READ_ERROR (-1)