summaryrefslogtreecommitdiff
path: root/libc/sysdeps/linux/common/fstat.c
diff options
context:
space:
mode:
Diffstat (limited to 'libc/sysdeps/linux/common/fstat.c')
-rw-r--r--libc/sysdeps/linux/common/fstat.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/libc/sysdeps/linux/common/fstat.c b/libc/sysdeps/linux/common/fstat.c
index 0b2798ad4..65e879799 100644
--- a/libc/sysdeps/linux/common/fstat.c
+++ b/libc/sysdeps/linux/common/fstat.c
@@ -10,10 +10,11 @@
#include <unistd.h>
#include <sys/stat.h>
#include <sys/syscall.h>
+#include <bits/uClibc_arch_features.h>
#include "xstatconv.h"
-#if defined __NR_fstat64 && !defined __NR_fstat
+#if defined __NR_fstat64 && !defined __NR_fstat && !defined(__UCLIBC_USE_TIME64__)
int fstat(int fd, struct stat *buf)
{
return INLINE_SYSCALL(fstat64, 2, fd, buf);
@@ -29,7 +30,7 @@ int fstat(int fd, struct stat *buf)
}
libc_hidden_def(fstat)
-#elif __NR_statx && defined __UCLIBC_HAVE_STATX__
+#elif defined __NR_statx && defined __UCLIBC_HAVE_STATX__
# include <fcntl.h>
# include <statx_cp.h>
@@ -40,6 +41,8 @@ int fstat(int fd, struct stat *buf)
STATX_BASIC_STATS, &tmp);
if (rc == 0)
__cp_stat_statx ((struct stat *)buf, &tmp);
+
+ return rc;
}
libc_hidden_def(fstat)