aix,ibmi: fix compilation errors in fs_copyfile (#4404)
On IBM AIX (and PASE for IBM i), use st_timespec_t when _XOPEN_SOURCE>=700 and _ALL_SOURCE is defined. Signed-off-by: Jeffrey H. Johnson <trnsz@pobox.com>
This commit is contained in:
parent
1ee1063402
commit
eb5af8e3c0
@ -1317,6 +1317,11 @@ static ssize_t uv__fs_copyfile(uv_fs_t* req) {
|
|||||||
#if defined(__APPLE__)
|
#if defined(__APPLE__)
|
||||||
times[0] = src_statsbuf.st_atimespec;
|
times[0] = src_statsbuf.st_atimespec;
|
||||||
times[1] = src_statsbuf.st_mtimespec;
|
times[1] = src_statsbuf.st_mtimespec;
|
||||||
|
#elif defined(_AIX)
|
||||||
|
times[0].tv_sec = src_statsbuf.st_atime;
|
||||||
|
times[0].tv_nsec = src_statsbuf.st_atime_n;
|
||||||
|
times[1].tv_sec = src_statsbuf.st_mtime;
|
||||||
|
times[1].tv_nsec = src_statsbuf.st_mtime_n;
|
||||||
#else
|
#else
|
||||||
times[0] = src_statsbuf.st_atim;
|
times[0] = src_statsbuf.st_atim;
|
||||||
times[1] = src_statsbuf.st_mtim;
|
times[1] = src_statsbuf.st_mtim;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user