X-Git-Url: http://git.ozlabs.org/?p=ccan;a=blobdiff_plain;f=ccan%2Ffailtest%2Ffailtest_override.h;h=0d71312c4a63f2820214231ea804988f30cd106f;hp=cfc180022643e18ae5ed50f537db550ba79caebc;hb=f725bbb1987284933e0f21dfb8f2ce7a1f0806e5;hpb=e50b1a072279e2ecf461f379094ff1726a4c19e9 diff --git a/ccan/failtest/failtest_override.h b/ccan/failtest/failtest_override.h index cfc18002..0d71312c 100644 --- a/ccan/failtest/failtest_override.h +++ b/ccan/failtest/failtest_override.h @@ -1,3 +1,4 @@ +/* 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. */ @@ -58,6 +59,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 */