diff options
author | Mike Frysinger <vapier@gentoo.org> | 2005-07-15 22:58:11 +0000 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2005-07-15 22:58:11 +0000 |
commit | 93b87ac72f84ac2f7924a7e4220e1d0eb86371de (patch) | |
tree | e3a6fcd919d0821e22d0233d20d0a7cf0a9d9084 | |
parent | a8ed82a8535dd508a9f008bad7994afbe5bd411f (diff) |
add support for passing nano seconds (if arch supports it)
-rw-r--r-- | libc/sysdeps/linux/common/xstatconv.c | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/libc/sysdeps/linux/common/xstatconv.c b/libc/sysdeps/linux/common/xstatconv.c index fc25c43db..60ec25bd5 100644 --- a/libc/sysdeps/linux/common/xstatconv.c +++ b/libc/sysdeps/linux/common/xstatconv.c @@ -48,9 +48,14 @@ void __xstat_conv(struct kernel_stat *kbuf, struct stat *buf) buf->st_atime = kbuf->st_atime; buf->st_mtime = kbuf->st_mtime; buf->st_ctime = kbuf->st_ctime; +#ifdef STAT_HAVE_NSEC + buf->st_atime_nsec = kbuf->st_atime_nsec; + buf->st_mtime_nsec = kbuf->st_mtime_nsec; + buf->st_ctime_nsec = kbuf->st_ctime_nsec; +#endif } -#if defined __UCLIBC_HAS_LFS__ + #if defined(__UCLIBC_HAS_LFS__) void __xstat64_conv(struct kernel_stat64 *kbuf, struct stat64 *buf) { /* Convert to current kernel version of `struct stat64'. */ @@ -70,6 +75,10 @@ void __xstat64_conv(struct kernel_stat64 *kbuf, struct stat64 *buf) buf->st_atime = kbuf->st_atime; buf->st_mtime = kbuf->st_mtime; buf->st_ctime = kbuf->st_ctime; +#ifdef STAT_HAVE_NSEC + buf->st_atime_nsec = kbuf->st_atime_nsec; + buf->st_mtime_nsec = kbuf->st_mtime_nsec; + buf->st_ctime_nsec = kbuf->st_ctime_nsec; +#endif } #endif - |