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/common | |
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/common')
-rw-r--r-- | libc/sysdeps/linux/common/xstatconv.c | 27 |
1 files changed, 18 insertions, 9 deletions
diff --git a/libc/sysdeps/linux/common/xstatconv.c b/libc/sysdeps/linux/common/xstatconv.c index 7edc42a81..a21579c41 100644 --- a/libc/sysdeps/linux/common/xstatconv.c +++ b/libc/sysdeps/linux/common/xstatconv.c @@ -37,9 +37,12 @@ void __xstat_conv(struct kernel_stat *kbuf, struct stat *buf) buf->st_size = kbuf->st_size; buf->st_blksize = kbuf->st_blksize; buf->st_blocks = kbuf->st_blocks; - buf->st_atim = kbuf->st_atim; - buf->st_mtim = kbuf->st_mtim; - buf->st_ctim = kbuf->st_ctim; + buf->st_atim.tv_sec = kbuf->st_atim.tv_sec; + buf->st_atim.tv_nsec = kbuf->st_atim.tv_nsec; + buf->st_mtim.tv_sec = kbuf->st_mtim.tv_sec; + buf->st_mtim.tv_nsec = kbuf->st_mtim.tv_nsec; + buf->st_ctim.tv_sec = kbuf->st_ctim.tv_sec; + buf->st_ctim.tv_nsec = kbuf->st_ctim.tv_nsec; } void __xstat32_conv(struct kernel_stat64 *kbuf, struct stat *buf) @@ -56,9 +59,12 @@ void __xstat32_conv(struct kernel_stat64 *kbuf, struct stat *buf) buf->st_size = kbuf->st_size; buf->st_blksize = kbuf->st_blksize; buf->st_blocks = kbuf->st_blocks; - buf->st_atim = kbuf->st_atim; - buf->st_mtim = kbuf->st_mtim; - buf->st_ctim = kbuf->st_ctim; + buf->st_atim.tv_sec = kbuf->st_atim.tv_sec; + buf->st_atim.tv_nsec = kbuf->st_atim.tv_nsec; + buf->st_mtim.tv_sec = kbuf->st_mtim.tv_sec; + buf->st_mtim.tv_nsec = kbuf->st_mtim.tv_nsec; + buf->st_ctim.tv_sec = kbuf->st_ctim.tv_sec; + buf->st_ctim.tv_nsec = kbuf->st_ctim.tv_nsec; } #ifdef __UCLIBC_HAS_LFS__ @@ -80,9 +86,12 @@ void __xstat64_conv(struct kernel_stat64 *kbuf, struct stat64 *buf) buf->st_size = kbuf->st_size; buf->st_blksize = kbuf->st_blksize; buf->st_blocks = kbuf->st_blocks; - buf->st_atim = kbuf->st_atim; - buf->st_mtim = kbuf->st_mtim; - buf->st_ctim = kbuf->st_ctim; + buf->st_atim.tv_sec = kbuf->st_atim.tv_sec; + buf->st_atim.tv_nsec = kbuf->st_atim.tv_nsec; + buf->st_mtim.tv_sec = kbuf->st_mtim.tv_sec; + buf->st_mtim.tv_nsec = kbuf->st_mtim.tv_nsec; + buf->st_ctim.tv_sec = kbuf->st_ctim.tv_sec; + buf->st_ctim.tv_nsec = kbuf->st_ctim.tv_nsec; } #endif /* __UCLIBC_HAS_LFS__ */ |