summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ext/GDBM_File/GDBM_File.xs2
-rw-r--r--ext/GDBM_File/t/opt.t7
2 files changed, 7 insertions, 2 deletions
diff --git a/ext/GDBM_File/GDBM_File.xs b/ext/GDBM_File/GDBM_File.xs
index c01fd28401..27e3fe44e4 100644
--- a/ext/GDBM_File/GDBM_File.xs
+++ b/ext/GDBM_File/GDBM_File.xs
@@ -878,7 +878,7 @@ gdbm_flags(db, ...)
PREINIT:
int opcode = -1;
int c_iv;
- unsigned c_uv;
+ size_t c_uv;
char *c_cv;
OPTVALPTR vptr = (OPTVALPTR) &c_iv;
size_t vsiz = sizeof(c_iv);
diff --git a/ext/GDBM_File/t/opt.t b/ext/GDBM_File/t/opt.t
index 72390ac32e..9d45241e5d 100644
--- a/ext/GDBM_File/t/opt.t
+++ b/ext/GDBM_File/t/opt.t
@@ -14,7 +14,7 @@ BEGIN {
plan(skip_all => "GDBM_File is flaky in $^O")
if $^O =~ /darwin/;
- plan(tests => 8);
+ plan(tests => 9);
use_ok('GDBM_File');
}
@@ -34,4 +34,9 @@ SKIP: {
is($db->sync_mode, 0, 'get sync_mode');
is($db->sync_mode(1), 1, 'set sync_mode');
is($db->sync_mode, 1, 'get sync_mode');
+ SKIP: {
+ my ($maj, $min) = GDBM_File->GDBM_version;
+ skip "gdbm too old", 1 if $maj != 1 || $maj == 1 && $min < 9;
+ isnt($db->mmapsize, 0, "get mmapsize");
+ }
}