From: Mikko Rasa Date: Fri, 24 May 2013 14:38:32 +0000 (+0300) Subject: Use _FILE_OFFSET_BITS rather than _LARGEFILE64_SOURCE X-Git-Url: http://git.tdb.fi/?a=commitdiff_plain;h=18bd1fd8496eb6b07476f6782072a5d6bd23f4be;p=libs%2Fcore.git Use _FILE_OFFSET_BITS rather than _LARGEFILE64_SOURCE lseek64 and off64_t are non-portable. This makes the standard lseek use a 64-bit interface. --- diff --git a/source/io/unix/seekable.cpp b/source/io/unix/seekable.cpp index 2c17114..93a6e86 100644 --- a/source/io/unix/seekable.cpp +++ b/source/io/unix/seekable.cpp @@ -1,4 +1,4 @@ -#define _LARGEFILE64_SOURCE +#define _FILE_OFFSET_BITS 64 #include #include #include @@ -31,8 +31,8 @@ namespace IO { SeekOffset sys_seek(Handle &handle, SeekOffset offset, SeekType type) { - off64_t ret = lseek64(*handle, offset, sys_seek_type(type)); - if(ret==(off64_t)-1) + off_t ret = lseek(*handle, offset, sys_seek_type(type)); + if(ret==(off_t)-1) { if(errno==EINVAL) throw bad_seek(offset, type);