return d;
}
+
#ifdef HAVE_SYS_SYSCALL_H
# include <sys/syscall.h>
+
# if defined(SYS_close_range)
# include <sys/types.h>
# ifndef HAVE_CLOSE_RANGE
# endif
# define HAVE_CLOSE_RANGE 1
# endif /* SYS_close_range */
+
+# if !defined(HAVE_STATX) && defined(SYS_statx)
+# include <fcntl.h>
+# include <sys/stat.h>
+static inline int statx(int fd, const char *restrict path, int flags,
+ unsigned int mask, struct statx *stx)
+{
+ return syscall(SYS_statx, fd, path, flags, mask, stx);
+}
+# endif /* SYS_statx */
+
#endif /* HAVE_SYS_SYSCALL_H */
+
extern void ul_close_all_fds(unsigned int first, unsigned int last);
#define UL_COPY_READ_ERROR (-1)