summaryrefslogtreecommitdiff
path: root/dir.c
diff options
context:
space:
mode:
Diffstat (limited to 'dir.c')
-rw-r--r--dir.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/dir.c b/dir.c
index f50c760e2f..c3ec434ea2 100644
--- a/dir.c
+++ b/dir.c
@@ -18,6 +18,12 @@
#include <unistd.h>
#endif
+#ifdef HAVE_STDLIB_H
+#include <stdlib.h>
+#else
+char *getenv();
+#endif
+
/* unistd.h defines _POSIX_VERSION on POSIX.1 systems. */
#if defined(DIRENT) || defined(_POSIX_VERSION)
#include <dirent.h>
@@ -145,8 +151,6 @@ Fdir_close(dir)
return Qnil;
}
-char *getenv();
-
static VALUE
Sdir_chdir(argc, argv, obj)
int argc;