Skip to content

Commit

Permalink
aix,ibmi: fix compilation errors in fs_copyfile (libuv#4404)
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
johnsonjh authored May 30, 2024
1 parent 1ee1063 commit eb5af8e
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/unix/fs.c
Original file line number Diff line number Diff line change
Expand Up @@ -1317,6 +1317,11 @@ static ssize_t uv__fs_copyfile(uv_fs_t* req) {
#if defined(__APPLE__)
times[0] = src_statsbuf.st_atimespec;
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
times[0] = src_statsbuf.st_atim;
times[1] = src_statsbuf.st_mtim;
Expand Down

0 comments on commit eb5af8e

Please sign in to comment.