summaryrefslogtreecommitdiff
path: root/ext/sdbm/_sdbm.c
diff options
context:
space:
mode:
authorakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-05-12 22:39:10 +0000
committerakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-05-12 22:39:10 +0000
commit5920d5440f36cef1b7e0ba3725679440684935de (patch)
treef051728299b76726671e9129312025c1fa7d8f9c /ext/sdbm/_sdbm.c
parentb6d3c5372449e77df05aedfefb7182c29f48c296 (diff)
* ext/sdbm/_sdbm.c: include unistd.h before sdbm.h for off_t.
fix compilation problem on FreeBSD 6.4. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27764 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/sdbm/_sdbm.c')
-rw-r--r--ext/sdbm/_sdbm.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/ext/sdbm/_sdbm.c b/ext/sdbm/_sdbm.c
index 533146f223b..b1ffdc04f0c 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 */