commit | 3645e71a43f57ceac914851998ad27a4ac33c208 | [log] [tgz] |
---|---|---|
author | Elliott Hughes <enh@google.com> | Fri Mar 17 18:50:12 2017 -0700 |
committer | Elliott Hughes <enh@google.com> | Fri Mar 17 18:50:12 2017 -0700 |
tree | 1dfb08f3626c0356e0df0e1562c243607c778a5b | |
parent | 9cb82a2c6b9001f7c50cbb3465f4aabc5d7cd055 [diff] [blame] |
Only rename sendfile to sendfile64 if we're L or newer. Without this, setting __FILE_OFFSET_BITS to 64 and targeting pre-L made sendfile entirely unavailable. Bug: https://github.com/android-ndk/ndk/issues/333 Test: builds Change-Id: I82d326ff244473dd5443632ff6c19d726d5e29ee
diff --git a/libc/include/sys/sendfile.h b/libc/include/sys/sendfile.h index 3ac8fdf..dccdec5 100644 --- a/libc/include/sys/sendfile.h +++ b/libc/include/sys/sendfile.h
@@ -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