Skip to content
This repository has been archived by the owner on Nov 8, 2023. It is now read-only.

Commit

Permalink
Only rename sendfile to sendfile64 if we're L or newer.
Browse files Browse the repository at this point in the history
Without this, setting __FILE_OFFSET_BITS to 64 and targeting pre-L
made sendfile entirely unavailable.

Bug: android/ndk#333
Test: builds
Change-Id: I82d326ff244473dd5443632ff6c19d726d5e29ee
  • Loading branch information
enh-google committed Mar 18, 2017
1 parent 9cb82a2 commit 3645e71
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion libc/include/sys/sendfile.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@

__BEGIN_DECLS

#if defined(__USE_FILE_OFFSET64)
#if defined(__USE_FILE_OFFSET64) && __ANDROID_API__ >= __ANDROID_API_L__
ssize_t sendfile(int out_fd, int in_fd, off_t* offset, size_t count) __RENAME(sendfile64)
__INTRODUCED_IN(21);
#else
Expand Down

0 comments on commit 3645e71

Please sign in to comment.