summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source4/lib/tdb/common/tdb_private.h4
-rw-r--r--source4/lib/tdb/config.m42
-rw-r--r--source4/lib/tdb/tools/tdbtorture.c2
3 files changed, 6 insertions, 2 deletions
diff --git a/source4/lib/tdb/common/tdb_private.h b/source4/lib/tdb/common/tdb_private.h
index a451dff0af..bfd8d04448 100644
--- a/source4/lib/tdb/common/tdb_private.h
+++ b/source4/lib/tdb/common/tdb_private.h
@@ -65,6 +65,10 @@ ssize_t pwrite(int fd, const void *buf, size_t count, off_t offset);
#define u32 unsigned
#endif
+#ifndef HAVE_GETPAGESIZE
+#define getpagesize() 0x2000
+#endif
+
typedef u32 tdb_len_t;
typedef u32 tdb_off_t;
diff --git a/source4/lib/tdb/config.m4 b/source4/lib/tdb/config.m4
index 31c33552ea..52daf7a8ea 100644
--- a/source4/lib/tdb/config.m4
+++ b/source4/lib/tdb/config.m4
@@ -1,4 +1,4 @@
-AC_CHECK_FUNCS(mmap pread pwrite)
+AC_CHECK_FUNCS(mmap pread pwrite getpagesize)
AC_CHECK_HEADERS(getopt.h)
AC_HAVE_DECL(pread, [#include <unistd.h>])
diff --git a/source4/lib/tdb/tools/tdbtorture.c b/source4/lib/tdb/tools/tdbtorture.c
index 96f8c16dfb..c6298167fd 100644
--- a/source4/lib/tdb/tools/tdbtorture.c
+++ b/source4/lib/tdb/tools/tdbtorture.c
@@ -319,7 +319,7 @@ static void usage(void)
if (pids[j] == pid) break;
}
if (j == num_procs) {
- printf("unknown child %d exited!?\n", pid);
+ printf("unknown child %d exited!?\n", (int)pid);
exit(1);
}
if (WEXITSTATUS(status) != 0) {