Comments (7)
AIX build is failing with the same error.
from libuv.
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.
from libuv.
Did a git bisect, the bad commit is the one 3 days ago:
commit bf61390769068de603e6deec8e16623efcbe761a (HEAD -> v1.x, origin/v1.x, origin/HEAD)
Author: Juan José Arboleda <[email protected]>
Date: Wed May 8 04:30:30 2024 -0500
linux,darwin: make `uv_fs_copyfile` behaves like `cp -r` (#4396)
This commit changes the timestamps in the file, the ownership and the
group.
Fixes: https://github.com/libuv/libuv/issues/3125
Signed-off-by: Juan José Arboleda <[email protected]>
from libuv.
Ping @juanarbol
from libuv.
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 _ALL_SOURCE
is defined, and that configure will always define it unconditionally, although I am not an autoconf expert.
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;
from libuv.
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.
from libuv.
Oopsie. I will be participating in #4404
from libuv.
Related Issues (20)
- fs_event_watch_dir test fails on alpine 3.19 HOT 5
- System freeze after suspending two instances of Neovim HOT 5
- test: test-thread-priority.c fails on Linux HOT 14
- windows uv_poll_init
- doc: improve example docs/code/progress/main.c HOT 1
- win: use WinDNS family of functions for DNS resolving HOT 4
- Improper Validation of Certificate Trust in certifi and dependent packages HOT 4
- 测试在Windows XP系统上运行时遇到RegGetValueW无法定位于ADVAPI32.dll的问题 HOT 4
- uv_tty_reset_mode doesn't work as advertised if original handle is closed HOT 5
- Provide an OS independent way to set/get UV_THREADPOOL_SIZE HOT 8
- about test udp_multicast_join | udp_multicast_join6 not ok | not ok 180 - metrics_pool_events HOT 3
- uv_tcp_close_reset() needs to handle some additional errno other than EINVAL on NetBSD HOT 2
- setuid() does not drop all privileges due to io_uring (CVE-2024-22017) HOT 3
- android and Debian: uv_fs_event stops working when file is deleted HOT 3
- unit test watcher_cross_stop fail in wsl2 HOT 1
- build fail HOT 6
- If you attempt to send a UDP packet to an IPv4 address using an IPv6 socket, sendto() will report the WSAEFAULT error. HOT 9
- Missing symbols in the library file compared to the headers HOT 4
- Issue with GetSystemTimePreciseAsFileTime on Windows Server 2008 in libuv 1.48.0 and Suggested Fix HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from libuv.