diff options
author | Reinhard Tartler <siretart@tauware.de> | 2018-03-14 08:17:06 -0400 |
---|---|---|
committer | Reinhard Tartler <siretart@tauware.de> | 2018-03-14 08:17:06 -0400 |
commit | c84f07d33496f2c0c6553c70991581c2bdc75e52 (patch) | |
tree | 28b9f1ac7afb1f062035ca4c6021325e4e0050c3 /lib | |
parent | 5c8edd41853a7a08f2eab8365f0f48a12035a6b6 (diff) | |
parent | 16a11e868c6280a64ec3f26f7537161dfa748d61 (diff) |
Merge branch 'master' of https://github.com/boxbackup/boxbackup into upstream
Diffstat (limited to 'lib')
-rw-r--r-- | lib/intercept/intercept.cpp | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/lib/intercept/intercept.cpp b/lib/intercept/intercept.cpp index 72bd8d4e..f46e6982 100644 --- a/lib/intercept/intercept.cpp +++ b/lib/intercept/intercept.cpp @@ -390,23 +390,23 @@ lseek(int fildes, off_t offset, int whence) { // random magic for lseek syscall, see /usr/src/lib/libc/sys/lseek.c CHECK_FOR_FAKE_ERROR_COND(fildes, 0, SYS_lseek, -1); + #ifdef PLATFORM_NO_SYSCALL int r = TEST_lseek(fildes, offset, whence); +#elif defined HAVE_LSEEK_DUMMY_PARAM + off_t r = syscall(SYS_lseek, fildes, 0 /* extra 0 required here! */, (int32_t)offset, + whence); +#elif defined HAVE_LSEEK_64_BIT + off_t r = syscall(SYS_lseek, fildes, (int64_t)offset, whence); #else - #ifdef HAVE_LSEEK_DUMMY_PARAM - off_t r = syscall(SYS_lseek, fildes, 0 /* extra 0 required here! */, offset, whence); - #elif defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS == 32 - // Don't bother trying to call SYS__llseek on 32 bit since it is - // fiddly and not needed for the tests - off_t r = syscall(SYS_lseek, fildes, (uint32_t)offset, whence); - #else - off_t r = syscall(SYS_lseek, fildes, offset, whence); - #endif + off_t r = syscall(SYS_lseek, fildes, (int32_t)offset, whence); #endif + if(r != -1) { intercept_filepos = r; } + return r; } |