diff options
author | Rusty Russell <rusty@rustcorp.com.au> | 2011-09-14 07:06:13 +0930 |
---|---|---|
committer | Rusty Russell <rusty@rustcorp.com.au> | 2011-09-14 07:06:13 +0930 |
commit | e8eebe0fbc3c3c946380a1c554bc1214ae899663 (patch) | |
tree | 77367f8ea8401e6df94150b63cecc31dfcb4279b /lib/tdb2/private.h | |
parent | abb437c0abedc6646927381017666db3f962befd (diff) | |
download | samba-e8eebe0fbc3c3c946380a1c554bc1214ae899663.tar.gz samba-e8eebe0fbc3c3c946380a1c554bc1214ae899663.tar.bz2 samba-e8eebe0fbc3c3c946380a1c554bc1214ae899663.zip |
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 <rusty@rustcorp.com.au>
Diffstat (limited to 'lib/tdb2/private.h')
-rw-r--r-- | lib/tdb2/private.h | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/lib/tdb2/private.h b/lib/tdb2/private.h index 0c3e441657..38d5b50218 100644 --- a/lib/tdb2/private.h +++ b/lib/tdb2/private.h @@ -18,14 +18,9 @@ License along with this library; if not, see <http://www.gnu.org/licenses/>. */ -#include "config.h" -#if HAVE_FILE_OFFSET_BITS -#define _FILE_OFFSET_BITS 64 -#endif +#include "tdb2.h" #include <ccan/likely/likely.h> -#include <ccan/compiler/compiler.h> #include <ccan/endian/endian.h> -#include "tdb2.h" #ifdef _SAMBA_BUILD_ #include "replace.h" @@ -43,7 +38,6 @@ #include <sys/mman.h> #include <unistd.h> #include <fcntl.h> -#include <string.h> #include <errno.h> #include <stdio.h> #include <utime.h> |