Skip to content

Commit 62c8bca

Browse files
committedOct 31, 2020
android: don't use copy_file_range on 32 bits
copy_file_range requires large offsets, which is currently disabled on 32 bits, in order to support building for Android API < 24.
1 parent 02799cb commit 62c8bca

File tree

1 file changed

+3
-0
lines changed
  • deps/uv/src/unix

1 file changed

+3
-0
lines changed
 

‎deps/uv/src/unix/fs.c

+3
Original file line numberDiff line numberDiff line change
@@ -889,6 +889,8 @@ static ssize_t uv__fs_sendfile(uv_fs_t* req) {
889889
off = req->off;
890890

891891
#ifdef __linux__
892+
#if !defined(__ANDROID__) || (!defined(__i386__) && !defined(__arm__)) || (defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS-0 == 64)
893+
// copy_file_range needs large offsets.
892894
{
893895
static int copy_file_range_support = 1;
894896

@@ -903,6 +905,7 @@ static ssize_t uv__fs_sendfile(uv_fs_t* req) {
903905
}
904906
}
905907
}
908+
#endif
906909
#endif
907910

908911
r = sendfile(out_fd, in_fd, &off, req->bufsml[0].len);

0 commit comments

Comments
 (0)
Failed to load comments.