From 625d588938d638ce72457305203e61e9f9ebc3b8 Mon Sep 17 00:00:00 2001 From: Martin Ebourne Date: Sat, 7 Jan 2006 23:35:52 +0000 Subject: Fix raidfile intercept tests on 32 bit Linux with large file support. Now intercept tests are never disabled. --- test/raidfile/intercept.cpp | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'test') 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 @@ -161,6 +161,15 @@ open(const char *path, int flags, mode_t mode) return r; } +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) { @@ -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 -- cgit v1.2.3