summaryrefslogtreecommitdiff
path: root/libc/sysdeps/linux/common/fstat64.c
diff options
context:
space:
mode:
Diffstat (limited to 'libc/sysdeps/linux/common/fstat64.c')
-rw-r--r--libc/sysdeps/linux/common/fstat64.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/libc/sysdeps/linux/common/fstat64.c b/libc/sysdeps/linux/common/fstat64.c
index 359c22af6..121b21fc8 100644
--- a/libc/sysdeps/linux/common/fstat64.c
+++ b/libc/sysdeps/linux/common/fstat64.c
@@ -8,8 +8,9 @@
#include <_lfs_64.h>
#include <sys/syscall.h>
+#include <linux/version.h>
-#if defined(__NR_fstat64) && !defined(__UCLIBC_USE_TIME64__)
+#if defined(__NR_fstat64) && (!defined(__UCLIBC_USE_TIME64__) || LINUX_VERSION_CODE <= KERNEL_VERSION(5,1,0))
# include <unistd.h>
# include <sys/stat.h>
# include "xstatconv.h"