Skip to content

Instantly share code, notes, and snippets.

@KalleZ
Created October 23, 2017 01:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save KalleZ/7b72d4a62e1e90784788ff2c18d673e6 to your computer and use it in GitHub Desktop.
Save KalleZ/7b72d4a62e1e90784788ff2c18d673e6 to your computer and use it in GitHub Desktop.
diff --git a/ext/date/php_date.c b/ext/date/php_date.c
index 68235c4..8a17859 100644
--- a/ext/date/php_date.c
+++ b/ext/date/php_date.c
@@ -1,4 +1,4 @@
-/*
+/*
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
@@ -31,9 +31,12 @@
#include "lib/timelib.h"
#include "lib/timelib_private.h"
#ifndef PHP_WIN32
-#include <time.h>
+# include <time.h>
+# ifdef __MINGW32__
+typedef long suseconds_t;
+# endif
#else
-#include "win32/time.h"
+# include "win32/time.h"
#endif
#ifdef PHP_WIN32
diff --git a/main/php.h b/main/php.h
index 6dc05ca..3f6e663 100644
--- a/main/php.h
+++ b/main/php.h
@@ -125,6 +125,10 @@ typedef int pid_t;
# endif
#endif
+#ifdef __MINGW32__
+typedef uint8_t u_char;
+#endif
+
#if HAVE_ASSERT_H
#if PHP_DEBUG
#undef NDEBUG
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment