summaryrefslogtreecommitdiff
path: root/sysdeps/unix/sysv/linux
diff options
context:
space:
mode:
authorAlbert ARIBAUD (3ADEV) <albert.aribaud@3adev.fr>2017-05-24 10:27:17 +0200
committerAlbert ARIBAUD (3ADEV) <albert.aribaud@3adev.fr>2017-05-24 10:29:39 +0200
commit382163bf91f32b6d1ea9d3f23122771758572818 (patch)
tree12008159ef27a317daf0a8f3b7dc985ad4f69961 /sysdeps/unix/sysv/linux
parent344177b0439bc25477514b7e52ac18e2d10fdf55 (diff)
downloadglibc-aaribaud/y2038-2.23.tar.gz
Add __fstatat64_t64, __fxstatat_t64aaribaud/y2038-2.23
Diffstat (limited to 'sysdeps/unix/sysv/linux')
-rw-r--r--sysdeps/unix/sysv/linux/fxstatat64.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/sysdeps/unix/sysv/linux/fxstatat64.c b/sysdeps/unix/sysv/linux/fxstatat64.c
index 7ffa2d4a9b..9114ea7570 100644
--- a/sysdeps/unix/sysv/linux/fxstatat64.c
+++ b/sysdeps/unix/sysv/linux/fxstatat64.c
@@ -26,6 +26,8 @@
#include <sysdep.h>
#include <sys/syscall.h>
+#include <xstatconv.h>
+
/* Get information about the file NAME in BUF. */
int
@@ -45,3 +47,21 @@ __fxstatat64 (int vers, int fd, const char *file, struct stat64 *st, int flag)
err));
}
libc_hidden_def (__fxstatat64)
+
+int
+__fxstatat64_t64 (int vers, int fd, const char *file, struct __stat64_t64 *st, int flag)
+{
+ if (__glibc_unlikely (vers != _STAT_VER_LINUX))
+ return INLINE_SYSCALL_ERROR_RETURN_VALUE (EINVAL);
+
+ int result;
+ struct kernel_stat st64;
+ INTERNAL_SYSCALL_DECL (err);
+
+ result = INTERNAL_SYSCALL (fstatat64, err, 4, fd, file, &st64, flag);
+ if (!__builtin_expect (INTERNAL_SYSCALL_ERROR_P (result, err), 1))
+ return __xstat64_conv_t64 (vers, &st64, st);
+ else
+ return INLINE_SYSCALL_ERROR_RETURN_VALUE (INTERNAL_SYSCALL_ERRNO (result,
+ err));
+}