zos: don't use nanosecond timestamp fields
Nanosecond resolution for the timestamp fields `st_atim`, `st_mtim`, and `st_ctim` are not supported on z/OS. PR-URL: https://github.com/libuv/libuv/pull/3060 Reviewed-By: Richard Lau <rlau@redhat.com>
This commit is contained in:
parent
1073ceaea4
commit
14d09afa8b
@ -1357,7 +1357,8 @@ static void uv__to_stat(struct stat* src, uv_stat_t* dst) {
|
||||
dst->st_birthtim.tv_nsec = src->st_ctimensec;
|
||||
dst->st_flags = 0;
|
||||
dst->st_gen = 0;
|
||||
#elif !defined(_AIX) && ( \
|
||||
#elif !defined(_AIX) && \
|
||||
!defined(__MVS__) && ( \
|
||||
defined(__DragonFly__) || \
|
||||
defined(__FreeBSD__) || \
|
||||
defined(__OpenBSD__) || \
|
||||
|
||||
@ -1453,7 +1453,8 @@ TEST_IMPL(fs_fstat) {
|
||||
ASSERT(s->st_mtim.tv_nsec == t.st_mtimespec.tv_nsec);
|
||||
ASSERT(s->st_ctim.tv_sec == t.st_ctimespec.tv_sec);
|
||||
ASSERT(s->st_ctim.tv_nsec == t.st_ctimespec.tv_nsec);
|
||||
#elif defined(_AIX)
|
||||
#elif defined(_AIX) || \
|
||||
defined(__MVS__)
|
||||
ASSERT(s->st_atim.tv_sec == t.st_atime);
|
||||
ASSERT(s->st_atim.tv_nsec == 0);
|
||||
ASSERT(s->st_mtim.tv_sec == t.st_mtime);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user