diff --git a/pd/src/s_path.c b/pd/src/s_path.c
index 037e03b5fed256989d61ac30ce9691bbbea50581..a1ef27921cda67b0ca5d24444b78f95d44a0af35 100644
--- a/pd/src/s_path.c
+++ b/pd/src/s_path.c
@@ -18,8 +18,9 @@
 #include <unistd.h>
 #include <sys/stat.h>
 #endif
-#ifdef MSW
+#ifdef _WIN32
 #include <io.h>
+#include <sys/stat.h>
 #include <windows.h>
 #endif