aboutsummaryrefslogtreecommitdiff
path: root/src/os_unix.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/os_unix.c')
-rw-r--r--src/os_unix.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/os_unix.c b/src/os_unix.c
index 42d988403..dfbb9338c 100644
--- a/src/os_unix.c
+++ b/src/os_unix.c
@@ -1002,8 +1002,10 @@ static int seekAndRead(unixFile *id, void *pBuf, int cnt){
int got;
i64 newOffset;
TIMER_START;
-#ifdef USE_PREAD
+#if defined(USE_PREAD)
got = pread(id->h, pBuf, cnt, id->offset);
+#elif defined(USE_PREAD64)
+ got = pread64(id->h, pBuf, cnt, id->offset);
#else
newOffset = lseek(id->h, id->offset, SEEK_SET);
if( newOffset!=id->offset ){
@@ -1047,8 +1049,10 @@ static int seekAndWrite(unixFile *id, const void *pBuf, int cnt){
int got;
i64 newOffset;
TIMER_START;
-#ifdef USE_PREAD
+#if defined(USE_PREAD)
got = pwrite(id->h, pBuf, cnt, id->offset);
+#elif defined(USE_PREAD64)
+ got = pwrite64(id->h, pBuf, cnt, id->offset);
#else
newOffset = lseek(id->h, id->offset, SEEK_SET);
if( newOffset!=id->offset ){