From 60a455dd449acdad9bdb21fbe68a15e2b584a5d2 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Sat, 24 Sep 2005 07:30:20 +0000 Subject: 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) --- source4/lib/tdb/common/tdb_private.h | 4 ++++ source4/lib/tdb/config.m4 | 2 +- source4/lib/tdb/tools/tdbtorture.c | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) (limited to 'source4/lib') 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 ]) 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) { -- cgit