tdb2: fix build with --enable-tdb2
authorRusty Russell <rusty@rustcorp.com.au>
Wed, 31 Aug 2011 04:26:40 +0000 (13:56 +0930)
committerRusty Russell <rusty@rustcorp.com.au>
Wed, 31 Aug 2011 04:26:40 +0000 (13:56 +0930)
tdb2 doesn't expost tdb_jenkins_hash; go straight to the source in
ccan/hash.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
source3/modules/vfs_shadow_copy2.c

index ca33b6d34442ff41a5e97638e70fa6bd251f6bb5..4ac9e849c4e3ed29517ed13b5300c1287bcb700c 100644 (file)
@@ -99,7 +99,7 @@
 #include "system/filesys.h"
 #include "include/ntioctl.h"
 #include "smbd/proto.h"
-#include <tdb.h>
+#include <ccan/hash/hash.h>
 #include "util_tdb.h"
 
 #define GMT_NAME_LEN 24 /* length of a @GMT- name */
@@ -438,9 +438,8 @@ static void convert_sbuf(vfs_handle_struct *handle, const char *fname,
                   without significant VFS changes
                */
                uint32_t shash;
-               TDB_DATA data = string_tdb_data(fname);
 
-               shash = tdb_jenkins_hash(&data) & 0xFF000000;
+               shash = hash(fname, strlen(fname), 0) & 0xFF000000;
                if (shash == 0) {
                        shash = 1;
                }