diff --git a/libs/port/mkstemps.c b/libs/port/mkstemps.c
index 7dd1672c863873229137b507865537c82e186d24..ccf212c871d5a736fd262882e0ab6693a33b0524 100644
--- a/libs/port/mkstemps.c
+++ b/libs/port/mkstemps.c
@@ -17,6 +17,7 @@
    Boston, MA 02111-1307, USA.  */
 
 #include "config.h"
+#include "wine/port.h"
 
 #include <sys/types.h>
 #include <stdlib.h>
@@ -30,6 +31,9 @@
 #ifdef HAVE_SYS_TIME_H
 #include <sys/time.h>
 #endif
+#ifdef HAVE_PROCESS_H
+#include <process.h>
+#endif
 
 /* We need to provide a type for gcc_uint64_t.  */
 #ifdef __GNUC__