diff options
| author | Karel Zak <kzak@redhat.com> | 2023-02-14 12:04:41 +0100 |
|---|---|---|
| committer | Karel Zak <kzak@redhat.com> | 2023-02-14 12:04:41 +0100 |
| commit | b8acbba6f7ef3ea367fbf92997931c442f29fafe (patch) | |
| tree | 10bb6f185b58d1e0906da4ab330f4ed8751ebad2 /include/fileutils.h | |
| parent | 4b646f01600a5efcf16e8e8991010b49b250bdfe (diff) | |
| download | util-linux-b8acbba6f7ef3ea367fbf92997931c442f29fafe.tar.gz | |
include: improve statx fallback
Addresses: https://github.com/util-linux/util-linux/pull/2065
Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'include/fileutils.h')
| -rw-r--r-- | include/fileutils.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/include/fileutils.h b/include/fileutils.h index 51fdcd5984..f2c6b23252 100644 --- a/include/fileutils.h +++ b/include/fileutils.h @@ -94,9 +94,9 @@ static inline int close_range(unsigned int first, unsigned int last, int flags) # define HAVE_CLOSE_RANGE 1 # endif /* SYS_close_range */ -# if !defined(HAVE_STATX) && defined(SYS_statx) +# if !defined(HAVE_STATX) && defined(SYS_statx) && defined(HAVE_LINUX_STAT_H) # include <fcntl.h> -# include <sys/stat.h> +# include <linux/stat.h> static inline int statx(int fd, const char *restrict path, int flags, unsigned int mask, struct statx *stx) { |
