[klibc] [klibc:master] mips64: Fix struct stat layout
klibc-bot for Ben Hutchings
ben at decadent.org.uk
Fri Jan 13 14:15:08 PST 2023
Commit-ID: 12f259dda1ef59b5f1f2fb67631dcbf94c18c56c
Gitweb: http://git.kernel.org/?p=libs/klibc/klibc.git;a=commit;h=12f259dda1ef59b5f1f2fb67631dcbf94c18c56c
Author: Ben Hutchings <ben at decadent.org.uk>
AuthorDate: Wed, 4 Jan 2023 01:34:39 +0100
Committer: Ben Hutchings <ben at decadent.org.uk>
CommitDate: Wed, 4 Jan 2023 01:34:39 +0100
[klibc] mips64: Fix struct stat layout
On mips64, struct stat has 32-bit time fields instead of following
struct timespec.
Signed-off-by: Ben Hutchings <ben at decadent.org.uk>
---
usr/include/arch/mips64/klibc/archstat.h | 13 ++++++++-----
1 file changed, 8 insertions(+), 5 deletions(-)
diff --git a/usr/include/arch/mips64/klibc/archstat.h b/usr/include/arch/mips64/klibc/archstat.h
index 2dbb907c..16f50c9e 100644
--- a/usr/include/arch/mips64/klibc/archstat.h
+++ b/usr/include/arch/mips64/klibc/archstat.h
@@ -3,8 +3,6 @@
#include <sys/types.h>
-#define _STATBUF_ST_NSEC
-
struct stat {
unsigned int st_dev;
unsigned int st_pad0[3]; /* Reserved for st_dev expansion */
@@ -22,9 +20,14 @@ struct stat {
off_t st_size;
- struct timespec st_atim;
- struct timespec st_mtim;
- struct timespec st_ctim;
+ unsigned int st_atime;
+ unsigned int st_atimensec;
+
+ unsigned int st_mtime;
+ unsigned int st_mtimensec;
+
+ unsigned int st_ctime;
+ unsigned int st_ctimensec;
unsigned int st_blksize;
unsigned int st_pad2;
More information about the klibc
mailing list