diff --git a/src/sm_genid.c b/src/sm_genid.c
index 3726eb1d2..082ce89fe 100644
--- a/src/sm_genid.c
+++ b/src/sm_genid.c
@@ -90,6 +90,9 @@ in this Software without prior written authorization from The Open Group.
 # define X_INCLUDE_NETDB_H
 # define XOS_USE_MTSAFE_NETDBAPI
 # include <X11/Xos_r.h>
+# ifdef _MSC_VER
+#  include <process.h>
+# endif
 
 #endif /* WIN32 */