r10471: stratos doesn't have getpagesize(), so guess 8k on systems that don't
authorAndrew Tridgell <tridge@samba.org>
Sat, 24 Sep 2005 07:30:20 +0000 (07:30 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 18:38:51 +0000 (13:38 -0500)
have it. Overestimating is harmless.
(This used to be commit ab953c8c72060c496876b6f39d388ad2f7e3c7e0)

source4/lib/tdb/common/tdb_private.h
source4/lib/tdb/config.m4
source4/lib/tdb/tools/tdbtorture.c

index a451dff0afa5028a88493a789749f02df5072b3c..bfd8d044488d87791f9edb49e55a283412cf2104 100644 (file)
@@ -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;
 
index 31c33552ea6ffbd10d98785ada66658877a08fb4..52daf7a8ea719920d0194d2827d2fa2a26086172 100644 (file)
@@ -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>])
index 96f8c16dfb69662df422b08843754ab66dca78b5..c6298167fd396621582b5642487e4b3495a2d177 100644 (file)
@@ -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) {