]> git.ozlabs.org Git - ccan/commitdiff
failtest: use 64 bit offsets if available.
authorRusty Russell <rusty@rustcorp.com.au>
Mon, 29 Aug 2011 08:03:25 +0000 (17:33 +0930)
committerRusty Russell <rusty@rustcorp.com.au>
Mon, 29 Aug 2011 08:03:25 +0000 (17:33 +0930)
We have to be consistent with the caller, so turn on 64 bit offsets if
available for both the caller and us.

ccan/failtest/failtest.c
ccan/failtest/failtest.h
ccan/failtest/failtest_override.h

index ce4e2ceed7bac188a0ef82d79eab1c326b7805c7..224898f9cb75ad8ad782c0dc983ade12c544cc06 100644 (file)
@@ -1,5 +1,5 @@
 /* Licensed under LGPL - see LICENSE file for details */
-#include "config.h"
+#include <ccan/failtest/failtest.h>
 #include <stdarg.h>
 #include <string.h>
 #include <stdio.h>
@@ -17,7 +17,6 @@
 #include <assert.h>
 #include <ccan/read_write_all/read_write_all.h>
 #include <ccan/failtest/failtest_proto.h>
-#include <ccan/failtest/failtest.h>
 #include <ccan/build_assert/build_assert.h>
 
 enum failtest_result (*failtest_hook)(struct failtest_call *, unsigned);
index 9cabd1a9a712d1ac2bb0c559e41a024b136f1f38..0cc8f60c51ba15aa48e207c6088bfe4d39b70050 100644 (file)
@@ -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 <sys/types.h>
 #include <stdbool.h>
 #include <fcntl.h>
index 0d71312c4a63f2820214231ea804988f30cd106f..eee45ff17682332720285763255ee2a57e0ca435 100644 (file)
@@ -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 <stdlib.h>