--- node-v12.17.0/deps/uv/src/unix/fs.c 2020-05-26 06:53:32.000000000 -0500 +++ node-v12.17.0+iPhone/deps/uv/src/unix/fs.c 2020-05-27 00:54:19.883409601 -0500 @@ -1102,6 +1102,17 @@ } static ssize_t uv__fs_copyfile(uv_fs_t* req) { +#if defined(__APPLE__) + /* On macOS, use the native copyfile(3). */ + copyfile_flags_t flags; + + flags = COPYFILE_ALL; + + if (req->flags & UV_FS_COPYFILE_EXCL) + flags |= COPYFILE_EXCL; + + return copyfile(req->path, req->new_path, NULL, flags); +#else uv_fs_t fs_req; uv_file srcfd; uv_file dstfd; @@ -1258,6 +1269,7 @@ errno = UV__ERR(result); return -1; +#endif } static void uv__to_stat(struct stat* src, uv_stat_t* dst) {