From cbec6ecd4d0fde5bf7fea20eb0c0c5fc9a6dec90 Mon Sep 17 00:00:00 2001 From: Waldemar Brodkorb Date: Sat, 14 Mar 2015 08:06:24 +0100 Subject: 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. --- libc/sysdeps/linux/common/xstatconv.c | 27 ++++++++++++++++++--------- 1 file changed, 18 insertions(+), 9 deletions(-) (limited to 'libc/sysdeps/linux/common') 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__ */ -- cgit v1.2.3