Only rename mmap to mmap64 if we're L or newer.

Without this, setting `__USE_FILE_OFFSET64` and targeting pre-L made
mmap entirely unavailable.

Test: make checkbuild
Bug: https://github.com/android-ndk/ndk/issues/332
Change-Id: I9f61c44f8d9ab5c7cae845c9f89a7d889c6df365
This commit is contained in:
Dan Albert 2017-03-17 11:47:09 -07:00
parent 616b2d87ea
commit 785b249df0

View file

@ -49,7 +49,7 @@ __BEGIN_DECLS
#define POSIX_MADV_WILLNEED MADV_WILLNEED
#define POSIX_MADV_DONTNEED MADV_DONTNEED
#if defined(__USE_FILE_OFFSET64)
#if defined(__USE_FILE_OFFSET64) && __ANDROID_API__ >= __ANDROID_API_L__
void* mmap(void*, size_t, int, int, int, off_t) __RENAME(mmap64) __INTRODUCED_IN(21);
#else
void* mmap(void*, size_t, int, int, int, off_t);