summaryrefslogtreecommitdiff
path: root/ext/dbm/dbm.c
diff options
context:
space:
mode:
Diffstat (limited to 'ext/dbm/dbm.c')
-rw-r--r--ext/dbm/dbm.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/ext/dbm/dbm.c b/ext/dbm/dbm.c
index 2ecc725ecb..9bd981862e 100644
--- a/ext/dbm/dbm.c
+++ b/ext/dbm/dbm.c
@@ -15,6 +15,9 @@
#include <ndbm.h>
#include <fcntl.h>
#include <errno.h>
+#ifdef USE_CWGUSI
+# include <sys/errno.h>
+#endif
VALUE cDBM;
@@ -331,7 +334,7 @@ fdbm_store(obj, keystr, valstr)
#ifdef HAVE_DBM_CLAERERR
dbm_clearerr(dbm);
#endif
- if (errno == EPERM) rb_sys_fail(Qnil);
+ if (errno == EPERM) rb_sys_fail(0);
Fail("dbm_store failed");
}