diff options
-rw-r--r-- | src/utils/include/fileutils.h | 14 | ||||
-rw-r--r-- | src/utils/lib/fileutils.c | 5 |
2 files changed, 1 insertions, 18 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) 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); |