summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlbert ARIBAUD (3ADEV) <albert.aribaud@3adev.fr>2017-09-08 00:41:50 +0200
committerAlbert ARIBAUD (3ADEV) <albert.aribaud@3adev.fr>2018-03-04 16:55:46 +0100
commitddac7d197fa5d27abcd19d5fc3de128a5ffc0c5e (patch)
treeaf1a9b356365a97f593d2656ad310e573d7a84d7
parent6646fe4bece8d87c0b32b580454dc85676fe51c1 (diff)
downloadglibc-ddac7d197fa5d27abcd19d5fc3de128a5ffc0c5e.tar.gz
Y2038: add struct __stat64_t64
-rw-r--r--include/sys/stat.h25
1 files changed, 25 insertions, 0 deletions
diff --git a/include/sys/stat.h b/include/sys/stat.h
index b82d452780..7344112674 100644
--- a/include/sys/stat.h
+++ b/include/sys/stat.h
@@ -1,7 +1,32 @@
#ifndef _SYS_STAT_H
#include <io/sys/stat.h>
+#include <include/time.h>
#ifndef _ISOMAC
+
+/* Used for 64-bit time implementations */
+struct __stat64_t64
+ {
+ __dev_t st_dev; /* Device. */
+ unsigned int __pad1;
+
+ __ino_t __st_ino; /* 32bit file serial number. */
+ __mode_t st_mode; /* File mode. */
+ __nlink_t st_nlink; /* Link count. */
+ __uid_t st_uid; /* User ID of the file's owner. */
+ __gid_t st_gid; /* Group ID of the file's group.*/
+ __dev_t st_rdev; /* Device number, if device. */
+ unsigned int __pad2;
+ __off64_t st_size; /* Size of file, in bytes. */
+ __blksize_t st_blksize; /* Optimal block size for I/O. */
+
+ __blkcnt64_t st_blocks; /* Number 512-byte blocks allocated. */
+ struct __timespec64 st_atim; /* Time of last access. */
+ struct __timespec64 st_mtim; /* Time of last modification. */
+ struct __timespec64 st_ctim; /* Time of last status change. */
+ __ino64_t st_ino; /* File serial number. */
+ };
+
/* Now define the internal interfaces. */
extern int __stat (const char *__file, struct stat *__buf);
extern int __fstat (int __fd, struct stat *__buf);