Index: Modules/_io/fileio.c =================================================================== --- Modules/_io/fileio.c (revision 77444) +++ Modules/_io/fileio.c (working copy) @@ -2,9 +2,15 @@ #define PY_SSIZE_T_CLEAN #include "Python.h" +#ifdef HAVE_SYS_TYPES_H #include +#endif +#ifdef HAVE_SYS_STAT_H #include +#endif +#ifdef HAVE_FCNTL_H #include +#endif #include /* For offsetof */ #include "_iomodule.h" Index: Modules/signalmodule.c =================================================================== --- Modules/signalmodule.c (revision 77444) +++ Modules/signalmodule.c (working copy) @@ -7,12 +7,17 @@ #include "intrcheck.h" #ifdef MS_WINDOWS +#ifdef HAVE_PROCESS_H #include #endif +#endif +#ifdef HAVE_SIGNAL_H #include - +#endif +#ifdef HAVE_SYS_STAT_H #include +#endif #ifdef HAVE_SYS_TIME_H #include #endif Index: Objects/fileobject.c =================================================================== --- Objects/fileobject.c (revision 77444) +++ Objects/fileobject.c (working copy) @@ -22,7 +22,7 @@ #define BUF(v) PyString_AS_STRING((PyStringObject *)v) -#ifndef DONT_HAVE_ERRNO_H +#ifdef HAVE_ERRNO_H #include #endif