lseek64 and off64_t are non-portable. This makes the standard lseek use
a 64-bit interface.
-#define _LARGEFILE64_SOURCE
+#define _FILE_OFFSET_BITS 64
#include <cerrno>
#include <unistd.h>
#include <msp/core/systemerror.h>
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);