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

Commit

Permalink
Only rename fgetpos/fsetpos/fseeko/ftello/funopen if we're N 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 these functions entirely unavailable.

Bug: android/ndk#333
Test: builds
Change-Id: Id17ae3c070f8b2650a9bc9aa2aa2e92c5fcdf4ad
  • Loading branch information
enh-google committed Mar 18, 2017
1 parent 9cb82a2 commit 79a3db0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion libc/include/stdio.h
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ int renameat(int, const char*, int, const char*);
int fseek(FILE*, long, int);
long ftell(FILE*);

#if defined(__USE_FILE_OFFSET64)
#if defined(__USE_FILE_OFFSET64) && __ANDROID_API__ >= __ANDROID_API_N__
int fgetpos(FILE*, fpos_t*) __RENAME(fgetpos64);
int fsetpos(FILE*, const fpos_t*) __RENAME(fsetpos64);
int fseeko(FILE*, off_t, int) __RENAME(fseeko64);
Expand Down

0 comments on commit 79a3db0

Please sign in to comment.