aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog5
-rw-r--r--ext/sdbm/_sdbm.c9
2 files changed, 10 insertions, 4 deletions
diff --git a/ChangeLog b/ChangeLog
index a607ff306f..74ed48328b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Thu May 13 07:37:49 2010 Tanaka Akira <akr@fsij.org>
+
+ * ext/sdbm/_sdbm.c: include unistd.h before sdbm.h for off_t.
+ fix compilation problem on FreeBSD 6.4.
+
Wed May 12 23:48:37 2010 Tanaka Akira <akr@fsij.org>
* include/ruby/intern.h (rb_quad_pack): deprecated.
diff --git a/ext/sdbm/_sdbm.c b/ext/sdbm/_sdbm.c
index 533146f223..b1ffdc04f0 100644
--- a/ext/sdbm/_sdbm.c
+++ b/ext/sdbm/_sdbm.c
@@ -13,6 +13,11 @@
#include "ruby/config.h"
#include "ruby/defines.h"
+
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+
#include "sdbm.h"
/*
@@ -23,10 +28,6 @@
#define BYTESIZ 8
-#ifdef HAVE_UNISTD_H
-#include <unistd.h>
-#endif
-
#ifdef BSD42
#define SEEK_SET L_SET
#define memset(s,c,n) bzero(s, n) /* only when c is zero */