X-Git-Url: http://git.ozlabs.org/?p=ccan;a=blobdiff_plain;f=ccan%2Ffailtest%2Ffailtest_override.h;h=dfcc62e0dd5f4ff5630cc727230a1361ce09ca0c;hp=a97d4e1723654fc5c5efa8e3b15491446a3e1c7e;hb=371a31d946c1055e8b7f7d9cec2b7f617206aeaf;hpb=c96ab569e73791eabe62e8d1c88b913e89eddc49 diff --git a/ccan/failtest/failtest_override.h b/ccan/failtest/failtest_override.h index a97d4e17..dfcc62e0 100644 --- a/ccan/failtest/failtest_override.h +++ b/ccan/failtest/failtest_override.h @@ -1,6 +1,7 @@ #ifndef CCAN_FAILTEST_OVERRIDE_H #define CCAN_FAILTEST_OVERRIDE_H /* This file is included before the source file to test. */ +#include "config.h" /* Replacement of allocators. */ #include @@ -57,6 +58,10 @@ #undef fcntl #define fcntl(fd, ...) failtest_fcntl((fd), __FILE__, __LINE__, __VA_ARGS__) +/* Replacement of getpid (since failtest will fork). */ +#undef getpid +#define getpid() failtest_getpid(__FILE__, __LINE__) + #include #endif /* CCAN_FAILTEST_OVERRIDE_H */