Include stdlib.h or declare getenv
diff --git a/Modules/getpath.c b/Modules/getpath.c
index 8e1c00d..4e356ed 100644
--- a/Modules/getpath.c
+++ b/Modules/getpath.c
@@ -1,6 +1,12 @@
 #include "Python.h"
 #include "osdefs.h"
 
+#ifdef HAVE_STDLIB_H
+#include <stdlib.h>
+#else
+extern char *getenv Py_PROTO((const char *));
+#endif
+
 
 #ifndef PYTHONPATH
 #define PYTHONPATH ".:/usr/local/lib/python"