summaryrefslogtreecommitdiff
path: root/source4/lib/tdb
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2005-09-24 07:30:20 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:38:51 -0500
commit60a455dd449acdad9bdb21fbe68a15e2b584a5d2 (patch)
tree7f1e1e60a4adcabed14548a69c4704ecfd3773af /source4/lib/tdb
parentc72afc39f08cca1937cb41d406e66bcc4dbdd80a (diff)
downloadsamba-60a455dd449acdad9bdb21fbe68a15e2b584a5d2.tar.gz
samba-60a455dd449acdad9bdb21fbe68a15e2b584a5d2.tar.bz2
samba-60a455dd449acdad9bdb21fbe68a15e2b584a5d2.zip
r10471: stratos doesn't have getpagesize(), so guess 8k on systems that don't
have it. Overestimating is harmless. (This used to be commit ab953c8c72060c496876b6f39d388ad2f7e3c7e0)
Diffstat (limited to 'source4/lib/tdb')
-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) {