summaryrefslogtreecommitdiff
path: root/ext/etc
diff options
context:
space:
mode:
Diffstat (limited to 'ext/etc')
-rw-r--r--ext/etc/etc.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/ext/etc/etc.c b/ext/etc/etc.c
index 4cd941f586..c355fe117a 100644
--- a/ext/etc/etc.c
+++ b/ext/etc/etc.c
@@ -47,8 +47,12 @@ static VALUE sGroup;
#define HAVE_UNAME 1
#endif
-#ifndef _WIN32
-char *getenv();
+#ifdef STDC_HEADERS
+# include <stdlib.h>
+#else
+# ifdef HAVE_STDLIB_H
+# include <stdlib.h>
+# endif
#endif
char *getlogin();