I am trying to build Android L for 64-bit architecture.
My code goes like:
#if (HAS_LARGE_FILE_SUPPORT)
#define _FILE_OFFSET_BITS 64 //Defined in header file
/*Some File operations*/
#if HAS_LARGE_FILE_SUPPORT
return fseeko(iFile, offset, seekmode);
#else
return fseek(iFile, offset, seekmode);
/*Some File operations*/
#if HAS_LARGE_FILE_SUPPORT
return ftello(iFile, offset, seekmode);
#else
return ftell(iFile, offset, seekmode);
I am getting below ftello
and fseeko
errors:
error: call to 'ftello' declared with attribute error: not available with _FILE_OFFSET_BITS=64
error: call to 'fseeko' declared with attribute error: not available with _FILE_OFFSET_BITS=64
I checked about fseeko
and ftello
, on the manual pages it is mentioned that defining _FILE_OFFSET_BITS
with the value 64 will turn off_t
into a 64-bit type.
Still I am seeing this error.
I checked about this error but couldn't find any satisfactory answer.
It will be really helpful if anyone can help me with this.
-D_LARGEFILE_SOURCE
(See https://mcmap.net/q/606190/-what-is-the-difference-between-_largefile_source-and-_file_offset_bits-64/694576)? – Adown#define _LARGEFILE_SOURCE 1
#define _LARGEFILE64_SOURCE 1
– Weitzelint fseeko(FILE *stream, off_t offset, int whence);
which does not match the prototypes you posted – Spiritualizeint fseeko(...
" Err, what please? – AdownAPP_CPPFLAGS += -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64
– Khannaftell
only accepts one argument, theFILE*
. Andfseek
is only changed, that offset accepts anoff_t
andftell
returns anoff_t
, instead of justlong
. – Khannaint fseeko(FILE *stream, off_t offset, int whence)
andoff_t ftello(FILE *stream)
. Taken from the linux man pages here. – KhannaApplication.mk
andAndroid.mk
, please? – Khannaftello
andfseeko
, even quoting it. – Adown