#include "Config/config.h"
-#ifdef HAVE_SYS_MMAN_H
+#if defined(HAVE_SYS_MMAN_H) && !defined(_MSC_VER)
#include <sys/mman.h>
#endif
#include <sys/stat.h>
#endif
+#if defined(_MSC_VER)
+#define S_ISREG(X) ((X) & _S_IFREG)
+#endif
+
#endif
#include "Config/config.h"
-#ifdef HAVE_SYS_MMAN_H
+#if defined(HAVE_SYS_MMAN_H) && !defined(_MSC_VER)
#include <sys/mman.h>
#endif
#include <sys/stat.h>
#endif
+#if defined(_MSC_VER)
+#define S_ISREG(X) ((X) & _S_IFREG)
+#endif
+
#endif