]> git.tdb.fi Git - libs/core.git/blobdiff - source/io/unix/seekable.cpp
Use _FILE_OFFSET_BITS rather than _LARGEFILE64_SOURCE
[libs/core.git] / source / io / unix / seekable.cpp
index 2c17114df3d617a1037e3ee6167cff051249fc88..93a6e86e1f8427635f5f7da38ac825e7c8fe3a3f 100644 (file)
@@ -1,4 +1,4 @@
-#define _LARGEFILE64_SOURCE
+#define _FILE_OFFSET_BITS 64
 #include <cerrno>
 #include <unistd.h>
 #include <msp/core/systemerror.h>
@@ -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);