diff options
author | Martin Ebourne <martin@ebourne.me.uk> | 2006-01-07 23:35:52 +0000 |
---|---|---|
committer | Martin Ebourne <martin@ebourne.me.uk> | 2006-01-07 23:35:52 +0000 |
commit | 625d588938d638ce72457305203e61e9f9ebc3b8 (patch) | |
tree | 79d1d3106306096838db67ff54b5d6809305a228 /test | |
parent | 4236badf30da3ebff007ad72d91fd10e32f5c345 (diff) |
Fix raidfile intercept tests on 32 bit Linux with large file support.
Now intercept tests are never disabled.
Diffstat (limited to 'test')
-rw-r--r-- | test/raidfile/intercept.cpp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/test/raidfile/intercept.cpp b/test/raidfile/intercept.cpp index 11cd06e9..6df344e1 100644 --- a/test/raidfile/intercept.cpp +++ b/test/raidfile/intercept.cpp @@ -162,6 +162,15 @@ open(const char *path, int flags, mode_t mode) } extern "C" int +open64(const char *path, int flags, mode_t mode) +{ + // With _FILE_OFFSET_BITS set to 64 this should really use (flags | + // O_LARGEFILE) here, but not actually necessary for the tests and not + // worth the trouble finding O_LARGEFILE + return open(path, flags, mode); +} + +extern "C" int close(int d) { CHECK_FOR_FAKE_ERROR_COND(d, SIZE_ALWAYS_ERROR, SYS_close, -1); @@ -245,6 +254,10 @@ lseek(int fildes, off_t offset, int 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) + // 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 |