New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Build currently failing on AIX and OS/400 (IBM i) #4403
Comments
AIX build is failing with the same error. |
Must be a change within the last 60 days or so, I haven't yet bisected it. Reverting my application CI build processes to use the last released libuv (1.48.0) is a successful workaround for now. |
Did a git bisect, the bad commit is the one 3 days ago:
|
Ping @juanarbol |
I'll remove NetBSD from this issue for now, I think that was a local configuration error, so I will open a separate issue if needed when I have more information. The AIX, the error messages are: src/unix/fs.c: In function 'uv__fs_copyfile':
src/unix/fs.c:1321:14: error: incompatible types when assigning to type 'struct timespec' from type 'st_timespec_t' {aka 'struct st_timespec'}
1321 | times[0] = src_statsbuf.st_atim;
| ^~~~~~~~~~~~
src/unix/fs.c:1322:14: error: incompatible types when assigning to type 'struct timespec' from type 'st_timespec_t' {aka 'struct st_timespec'}
1322 | times[1] = src_statsbuf.st_mtim;
| ^~~~~~~~~~~~ I had a bit of time to look into the problem. From the AIX stat.h header: #if _XOPEN_SOURCE>=700
#ifdef _ALL_SOURCE
st_timespec_t st_atim; /* Time of last access */
st_timespec_t st_mtim; /* Time of last data modification */
st_timespec_t st_ctim; /* Time of last file status change */
#else
struct timespec st_atim;/* Time of last access */
struct timespec st_mtim;/* Time of last data modification */
struct timespec st_ctim;/* Time of last file status change */
#endif
#else
time_t st_atime; /* Time of last access */
int st_atime_n;
time_t st_mtime; /* Time of last data modification */
int st_mtime_n;
time_t st_ctime; /* Time of last file status change */
int st_ctime_n;
#endif A quick check shows that The following patch seems to be sufficient: diff --git a/src/unix/fs.c b/src/unix/fs.c
index 0c6c585c..7a2ce054 100644
--- a/src/unix/fs.c
+++ b/src/unix/fs.c
@@ -1226,21 +1226,25 @@ static ssize_t uv__fs_write(uv_fs_t* req) {
return r;
}
static ssize_t uv__fs_copyfile(uv_fs_t* req) {
uv_fs_t fs_req;
uv_file srcfd;
uv_file dstfd;
struct stat src_statsbuf;
struct stat dst_statsbuf;
+#if defined(_AIX) && _XOPEN_SOURCE>=700 && defined(_ALL_SOURCE)
+ st_timespec_t times[2];
+#else
struct timespec times[2];
+#endif
int dst_flags;
int result;
int err;
off_t bytes_to_send;
off_t in_offset;
off_t bytes_written;
size_t bytes_chunk;
dstfd = -1;
err = 0; |
I just tested on OS/400 (PASE for IBM i 7.5, GCC 10.5.0, powerpc-ibm-os400) - it was broken in the same way, so I've updated the title again. The patch above works there also. |
Oopsie. I will be participating in #4404 |
The text was updated successfully, but these errors were encountered: