X-Git-Url: https://git.ozlabs.org/?a=blobdiff_plain;f=ccan%2Ffailtest%2Ffailtest_override.h;h=7178afd43424038f195a9b7da08252369f8a4873;hb=eaff14657e211975f22d86210b98524401bcd45b;hp=dfcc62e0dd5f4ff5630cc727230a1361ce09ca0c;hpb=371a31d946c1055e8b7f7d9cec2b7f617206aeaf;p=ccan diff --git a/ccan/failtest/failtest_override.h b/ccan/failtest/failtest_override.h index dfcc62e0..7178afd4 100644 --- a/ccan/failtest/failtest_override.h +++ b/ccan/failtest/failtest_override.h @@ -1,7 +1,11 @@ +/* Licensed under LGPL - see LICENSE file for details */ #ifndef CCAN_FAILTEST_OVERRIDE_H #define CCAN_FAILTEST_OVERRIDE_H /* This file is included before the source file to test. */ #include "config.h" +#if HAVE_FILE_OFFSET_BITS +#define _FILE_OFFSET_BITS 64 +#endif /* Replacement of allocators. */ #include @@ -25,6 +29,7 @@ /* Replacement of I/O. */ #include #include +#include #include #include @@ -58,6 +63,11 @@ #undef fcntl #define fcntl(fd, ...) failtest_fcntl((fd), __FILE__, __LINE__, __VA_ARGS__) +#undef mmap +#define mmap(addr, length, prot, flags, fd, offset) \ + failtest_mmap((addr), (length), (prot), (flags), (fd), (offset), \ + __FILE__, __LINE__) + /* Replacement of getpid (since failtest will fork). */ #undef getpid #define getpid() failtest_getpid(__FILE__, __LINE__)