diff -Naur node-v12.17.0/deps/uv/src/unix/fs.c node-v12.17.0+iPhone/deps/uv/src/unix/fs.c --- node-v12.17.0/deps/uv/src/unix/fs.c 2020-05-26 04:53:32.000000000 -0700 +++ node-v12.17.0+iPhone/deps/uv/src/unix/fs.c 2020-05-27 20:56:16.000000000 -0700 @@ -1102,6 +1102,19 @@ } static ssize_t uv__fs_copyfile(uv_fs_t* req) { +#if defined(__APPLE__) +#include + + /* 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 +1271,7 @@ errno = UV__ERR(result); return -1; +#endif } static void uv__to_stat(struct stat* src, uv_stat_t* dst) {