From: Rusty Russell Date: Mon, 29 Aug 2011 08:03:25 +0000 (+0930) Subject: failtest: use 64 bit offsets if available. X-Git-Url: http://git.ozlabs.org/?p=ccan;a=commitdiff_plain;h=0a379f773681c7b3e53866b9a6e9cd0006012c1a;ds=sidebyside failtest: use 64 bit offsets if available. We have to be consistent with the caller, so turn on 64 bit offsets if available for both the caller and us. --- diff --git a/ccan/failtest/failtest.c b/ccan/failtest/failtest.c index ce4e2cee..224898f9 100644 --- a/ccan/failtest/failtest.c +++ b/ccan/failtest/failtest.c @@ -1,5 +1,5 @@ /* Licensed under LGPL - see LICENSE file for details */ -#include "config.h" +#include #include #include #include @@ -17,7 +17,6 @@ #include #include #include -#include #include enum failtest_result (*failtest_hook)(struct failtest_call *, unsigned); diff --git a/ccan/failtest/failtest.h b/ccan/failtest/failtest.h index 9cabd1a9..0cc8f60c 100644 --- a/ccan/failtest/failtest.h +++ b/ccan/failtest/failtest.h @@ -2,6 +2,9 @@ #ifndef CCAN_FAILTEST_H #define CCAN_FAILTEST_H #include "config.h" +#if HAVE_FILE_OFFSET_BITS +#define _FILE_OFFSET_BITS 64 +#endif #include #include #include diff --git a/ccan/failtest/failtest_override.h b/ccan/failtest/failtest_override.h index 0d71312c..eee45ff1 100644 --- a/ccan/failtest/failtest_override.h +++ b/ccan/failtest/failtest_override.h @@ -3,6 +3,9 @@ #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