diff options
author | Waldemar Brodkorb <wbx@openadk.org> | 2015-03-14 08:06:24 +0100 |
---|---|---|
committer | Waldemar Brodkorb <wbx@openadk.org> | 2015-03-14 08:06:24 +0100 |
commit | cbec6ecd4d0fde5bf7fea20eb0c0c5fc9a6dec90 (patch) | |
tree | bdb9a1bd5500c8256f835c97d51118e79584d170 /libc/sysdeps/linux/mips/bits | |
parent | a8ef24af00206f92061753782e15f773f9bd135e (diff) |
Add fix from OpenWrt for MIPS64 N64 ABI
https://dev.openwrt.org/browser/trunk/toolchain/uClibc/patches-0.9.33.2/616-mips_fix_stat_time.patch
When booting in Qemu you get for example failures from mdev -s otherwise.
Diffstat (limited to 'libc/sysdeps/linux/mips/bits')
-rw-r--r-- | libc/sysdeps/linux/mips/bits/kernel_stat.h | 36 |
1 files changed, 24 insertions, 12 deletions
diff --git a/libc/sysdeps/linux/mips/bits/kernel_stat.h b/libc/sysdeps/linux/mips/bits/kernel_stat.h index 655c089e0..a2a6169a3 100644 --- a/libc/sysdeps/linux/mips/bits/kernel_stat.h +++ b/libc/sysdeps/linux/mips/bits/kernel_stat.h @@ -8,6 +8,18 @@ #include <sgidefs.h> #if _MIPS_SIM == _MIPS_SIM_ABI64 +typedef struct { + unsigned int tv_sec; + unsigned int tv_nsec; +} __ktimespec_t; +#else +typedef struct { + time_t tv_sec; + unsigned long tv_nsec; +} __ktimespec_t; +#endif + +#if _MIPS_SIM == _MIPS_SIM_ABI64 /* The memory layout is the same as of struct stat64 of the 32-bit kernel. */ struct kernel_stat { __kernel_dev_t st_dev; @@ -20,9 +32,9 @@ struct kernel_stat { __kernel_dev_t st_rdev; unsigned int st_pad2[3]; __kernel_off_t st_size; - struct timespec st_atim; - struct timespec st_mtim; - struct timespec st_ctim; + __ktimespec_t st_atim; + __ktimespec_t st_mtim; + __ktimespec_t st_ctim; unsigned int st_blksize; unsigned int reserved3; unsigned long st_blocks; @@ -41,9 +53,9 @@ struct kernel_stat { unsigned int st_rdev; unsigned int st_pad2[3]; unsigned long long st_size; - struct timespec st_atim; - struct timespec st_mtim; - struct timespec st_ctim; + __ktimespec_t st_atim; + __ktimespec_t st_mtim; + __ktimespec_t st_ctim; unsigned int st_blksize; unsigned int reserved3; unsigned long long st_blocks; @@ -62,9 +74,9 @@ struct kernel_stat { long st_pad2[2]; __kernel_off_t st_size; long st_pad3; - struct timespec st_atim; - struct timespec st_mtim; - struct timespec st_ctim; + __ktimespec_t st_atim; + __ktimespec_t st_mtim; + __ktimespec_t st_ctim; long st_blksize; long st_blocks; long st_pad4[14]; @@ -81,9 +93,9 @@ struct kernel_stat64 { unsigned long st_rdev; unsigned long st_pad1[3]; /* Reserved for st_rdev expansion */ long long st_size; - struct timespec st_atim; - struct timespec st_mtim; - struct timespec st_ctim; + __ktimespec_t st_atim; + __ktimespec_t st_mtim; + __ktimespec_t st_ctim; unsigned long st_blksize; unsigned long st_pad2; long long st_blocks; |