From e8eebe0fbc3c3c946380a1c554bc1214ae899663 Mon Sep 17 00:00:00 2001 From: Rusty Russell Date: Wed, 14 Sep 2011 07:06:13 +0930 Subject: tdb2: Fix to always use 64-bit offset definition We use off_t in the tdb2 interface (for tdb_attribute_flock); we need to make sure that all callers agree on the size. This also causes a problem in the tests: it's not enough to include config.h first, we need the _FILE_OFFSET_BITS define from private.h. Otherwise, we can disagree about the definitions of F_SETLK, F_SETLKW and off_t, causing strange problems. (Imported from CCAN commit baa17ee2d5e01a32030f19e566007417d72b4b6e) Signed-off-by: Rusty Russell --- lib/tdb2/test/lock-tracking.c | 2 +- lib/tdb2/test/run-56-open-during-transaction.c | 2 +- lib/tdb2/test/run-57-die-during-transaction.c | 2 +- lib/tdb2/test/run-lockall.c | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) (limited to 'lib/tdb2/test') diff --git a/lib/tdb2/test/lock-tracking.c b/lib/tdb2/test/lock-tracking.c index 05dba32fd3..ba09399219 100644 --- a/lib/tdb2/test/lock-tracking.c +++ b/lib/tdb2/test/lock-tracking.c @@ -1,10 +1,10 @@ /* We save the locks so we can reaquire them. */ +#include #include #include #include #include #include -#include #include "lock-tracking.h" struct lock { diff --git a/lib/tdb2/test/run-56-open-during-transaction.c b/lib/tdb2/test/run-56-open-during-transaction.c index 96107d637e..88933e02ed 100644 --- a/lib/tdb2/test/run-56-open-during-transaction.c +++ b/lib/tdb2/test/run-56-open-during-transaction.c @@ -1,4 +1,4 @@ -#include "config.h" +#include #include #include "lock-tracking.h" diff --git a/lib/tdb2/test/run-57-die-during-transaction.c b/lib/tdb2/test/run-57-die-during-transaction.c index 84f01eb21a..1b02802359 100644 --- a/lib/tdb2/test/run-57-die-during-transaction.c +++ b/lib/tdb2/test/run-57-die-during-transaction.c @@ -1,4 +1,4 @@ -#include "config.h" +#include #include #include "lock-tracking.h" #include diff --git a/lib/tdb2/test/run-lockall.c b/lib/tdb2/test/run-lockall.c index 4aedf59743..7f75159cca 100644 --- a/lib/tdb2/test/run-lockall.c +++ b/lib/tdb2/test/run-lockall.c @@ -1,4 +1,4 @@ -#include "config.h" +#include #include #include "lock-tracking.h" -- cgit