From 18bd1fd8496eb6b07476f6782072a5d6bd23f4be Mon Sep 17 00:00:00 2001 From: Mikko Rasa Date: Fri, 24 May 2013 17:38:32 +0300 Subject: [PATCH] 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. --- source/io/unix/seekable.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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); -- 2.43.0