- MinGW compatibility Signed-off-by: SSE4 <tomskside@gmail.com>
diff --git a/example.c b/example.c
index be7f97a..2d1e1a0 100644
--- a/example.c
+++ b/example.c
@@ -1,6 +1,11 @@
#define _XOPEN_SOURCE 500
#include <stdlib.h>
+
+#ifdef __MINGW32__
+#include <sys/types.h>
+#endif /* __MINGW32__ */
+
#include <sys/wait.h>
#include <windows.h>
diff --git a/sys/wait.h b/sys/wait.h
index d0f6491..8922dc5 100644
--- a/sys/wait.h
+++ b/sys/wait.h
@@ -115,11 +115,12 @@ extern "C" {
#define WSTOPSIG(status) __WSTOPSIG(status)
#endif /* WSTOPSIG */
-#ifndef __pid_t_defined
+#if !defined(__pid_t_defined) && !defined(_PID_T_)
#define __pid_t_defined 1
+#define _PID_T_
typedef int __pid_t;
typedef __pid_t pid_t;
-#endif /* __pid_t_defined */
+#endif /* !defined(__pid_t_defined) && !defined(_PID_T_) */
#ifndef __id_t_defined
#define __id_t_defined 1