summaryrefslogtreecommitdiff
path: root/patches
diff options
context:
space:
mode:
authorAlexey Neyman <stilor@att.net>2017-03-11 23:36:39 (GMT)
committerAlexey Neyman <stilor@att.net>2017-03-11 23:36:39 (GMT)
commit0b566d687fdd2da48e5ec64f1edeb7570d02f1a3 (patch)
tree9312fbfb5a6e3175414a6e346201617e94d380c8 /patches
parenta8a080f9b60811e4e10625862d5004f2b67c30ea (diff)
Only include <malloc.h> if configure says it exists
Signed-off-by: Alexey Neyman <stilor@att.net>
Diffstat (limited to 'patches')
-rw-r--r--patches/mingw-w64/v2.0.7/100-mingw64-malloc.patch27
-rw-r--r--patches/mingw-w64/v2.0.8/100-mingw64-malloc.patch27
-rw-r--r--patches/mingw-w64/v2.0.9/100-mingw64-malloc.patch27
-rw-r--r--patches/mingw-w64/v3.0.0/100-mingw64-malloc.patch27
-rw-r--r--patches/mingw-w64/v3.1.0/100-mingw64-malloc.patch27
-rw-r--r--patches/mingw-w64/v3.2.0/100-mingw64-malloc.patch27
-rw-r--r--patches/mingw-w64/v3.3.0/100-mingw64-malloc.patch27
-rw-r--r--patches/mingw-w64/v4.0.0/100-mingw64-malloc.patch27
-rw-r--r--patches/mingw-w64/v4.0.1/100-mingw64-malloc.patch27
-rw-r--r--patches/mingw-w64/v4.0.2/100-mingw64-malloc.patch27
-rw-r--r--patches/mingw-w64/v4.0.4/100-mingw64-malloc.patch27
-rw-r--r--patches/mingw-w64/v4.0.5/100-mingw64-malloc.patch27
-rw-r--r--patches/mingw-w64/v4.0.6/100-mingw64-malloc.patch27
-rw-r--r--patches/mingw-w64/v5.0.0/100-mingw64-malloc.patch55
-rw-r--r--patches/mingw-w64/v5.0.1/100-mingw64-malloc.patch55
15 files changed, 461 insertions, 0 deletions
diff --git a/patches/mingw-w64/v2.0.7/100-mingw64-malloc.patch b/patches/mingw-w64/v2.0.7/100-mingw64-malloc.patch
new file mode 100644
index 0000000..d9d5a61
--- /dev/null
+++ b/patches/mingw-w64/v2.0.7/100-mingw64-malloc.patch
@@ -0,0 +1,27 @@
+diff -urpN mingw-w64-v5.0.1.orig/mingw-w64-tools/genidl/src/genidl_cfg.h mingw-w64-v5.0.1/mingw-w64-tools/genidl/src/genidl_cfg.h
+--- mingw-w64-v5.0.1.orig/mingw-w64-tools/genidl/src/genidl_cfg.h 2017-03-10 16:20:09.000000000 -0800
++++ mingw-w64-v5.0.1/mingw-w64-tools/genidl/src/genidl_cfg.h 2017-03-10 16:25:26.000000000 -0800
+@@ -26,7 +26,9 @@
+ #include <stdio.h>
+ #include <stdlib.h>
+ #include <string.h>
++#if defined(HAVE_MALLOC_H)
+ #include <malloc.h>
++#endif
+ #include <memory.h>
+ #include <stdarg.h>
+ #include <stdint.h>
+diff -urpN mingw-w64-v5.0.1.orig/mingw-w64-tools/genidl/src/genidl_typinfo.c mingw-w64-v5.0.1/mingw-w64-tools/genidl/src/genidl_typinfo.c
+--- mingw-w64-v5.0.1.orig/mingw-w64-tools/genidl/src/genidl_typinfo.c 2017-03-10 16:20:09.000000000 -0800
++++ mingw-w64-v5.0.1/mingw-w64-tools/genidl/src/genidl_typinfo.c 2017-03-10 16:25:49.000000000 -0800
+@@ -21,7 +21,10 @@
+ #include "genidl_cfg.h"
+ #include "genidl_typeinfo.h"
+ #include "genidl_typinfo.h"
++#if defined(HAVE_MALLOC_H)
+ #include <malloc.h>
++#endif
++#include <stdlib.h>
+ #include <string.h>
+ #include <memory.h>
+
diff --git a/patches/mingw-w64/v2.0.8/100-mingw64-malloc.patch b/patches/mingw-w64/v2.0.8/100-mingw64-malloc.patch
new file mode 100644
index 0000000..d9d5a61
--- /dev/null
+++ b/patches/mingw-w64/v2.0.8/100-mingw64-malloc.patch
@@ -0,0 +1,27 @@
+diff -urpN mingw-w64-v5.0.1.orig/mingw-w64-tools/genidl/src/genidl_cfg.h mingw-w64-v5.0.1/mingw-w64-tools/genidl/src/genidl_cfg.h
+--- mingw-w64-v5.0.1.orig/mingw-w64-tools/genidl/src/genidl_cfg.h 2017-03-10 16:20:09.000000000 -0800
++++ mingw-w64-v5.0.1/mingw-w64-tools/genidl/src/genidl_cfg.h 2017-03-10 16:25:26.000000000 -0800
+@@ -26,7 +26,9 @@
+ #include <stdio.h>
+ #include <stdlib.h>
+ #include <string.h>
++#if defined(HAVE_MALLOC_H)
+ #include <malloc.h>
++#endif
+ #include <memory.h>
+ #include <stdarg.h>
+ #include <stdint.h>
+diff -urpN mingw-w64-v5.0.1.orig/mingw-w64-tools/genidl/src/genidl_typinfo.c mingw-w64-v5.0.1/mingw-w64-tools/genidl/src/genidl_typinfo.c
+--- mingw-w64-v5.0.1.orig/mingw-w64-tools/genidl/src/genidl_typinfo.c 2017-03-10 16:20:09.000000000 -0800
++++ mingw-w64-v5.0.1/mingw-w64-tools/genidl/src/genidl_typinfo.c 2017-03-10 16:25:49.000000000 -0800
+@@ -21,7 +21,10 @@
+ #include "genidl_cfg.h"
+ #include "genidl_typeinfo.h"
+ #include "genidl_typinfo.h"
++#if defined(HAVE_MALLOC_H)
+ #include <malloc.h>
++#endif
++#include <stdlib.h>
+ #include <string.h>
+ #include <memory.h>
+
diff --git a/patches/mingw-w64/v2.0.9/100-mingw64-malloc.patch b/patches/mingw-w64/v2.0.9/100-mingw64-malloc.patch
new file mode 100644
index 0000000..d9d5a61
--- /dev/null
+++ b/patches/mingw-w64/v2.0.9/100-mingw64-malloc.patch
@@ -0,0 +1,27 @@
+diff -urpN mingw-w64-v5.0.1.orig/mingw-w64-tools/genidl/src/genidl_cfg.h mingw-w64-v5.0.1/mingw-w64-tools/genidl/src/genidl_cfg.h
+--- mingw-w64-v5.0.1.orig/mingw-w64-tools/genidl/src/genidl_cfg.h 2017-03-10 16:20:09.000000000 -0800
++++ mingw-w64-v5.0.1/mingw-w64-tools/genidl/src/genidl_cfg.h 2017-03-10 16:25:26.000000000 -0800
+@@ -26,7 +26,9 @@
+ #include <stdio.h>
+ #include <stdlib.h>
+ #include <string.h>
++#if defined(HAVE_MALLOC_H)
+ #include <malloc.h>
++#endif
+ #include <memory.h>
+ #include <stdarg.h>
+ #include <stdint.h>
+diff -urpN mingw-w64-v5.0.1.orig/mingw-w64-tools/genidl/src/genidl_typinfo.c mingw-w64-v5.0.1/mingw-w64-tools/genidl/src/genidl_typinfo.c
+--- mingw-w64-v5.0.1.orig/mingw-w64-tools/genidl/src/genidl_typinfo.c 2017-03-10 16:20:09.000000000 -0800
++++ mingw-w64-v5.0.1/mingw-w64-tools/genidl/src/genidl_typinfo.c 2017-03-10 16:25:49.000000000 -0800
+@@ -21,7 +21,10 @@
+ #include "genidl_cfg.h"
+ #include "genidl_typeinfo.h"
+ #include "genidl_typinfo.h"
++#if defined(HAVE_MALLOC_H)
+ #include <malloc.h>
++#endif
++#include <stdlib.h>
+ #include <string.h>
+ #include <memory.h>
+
diff --git a/patches/mingw-w64/v3.0.0/100-mingw64-malloc.patch b/patches/mingw-w64/v3.0.0/100-mingw64-malloc.patch
new file mode 100644
index 0000000..d9d5a61
--- /dev/null
+++ b/patches/mingw-w64/v3.0.0/100-mingw64-malloc.patch
@@ -0,0 +1,27 @@
+diff -urpN mingw-w64-v5.0.1.orig/mingw-w64-tools/genidl/src/genidl_cfg.h mingw-w64-v5.0.1/mingw-w64-tools/genidl/src/genidl_cfg.h
+--- mingw-w64-v5.0.1.orig/mingw-w64-tools/genidl/src/genidl_cfg.h 2017-03-10 16:20:09.000000000 -0800
++++ mingw-w64-v5.0.1/mingw-w64-tools/genidl/src/genidl_cfg.h 2017-03-10 16:25:26.000000000 -0800
+@@ -26,7 +26,9 @@
+ #include <stdio.h>
+ #include <stdlib.h>
+ #include <string.h>
++#if defined(HAVE_MALLOC_H)
+ #include <malloc.h>
++#endif
+ #include <memory.h>
+ #include <stdarg.h>
+ #include <stdint.h>
+diff -urpN mingw-w64-v5.0.1.orig/mingw-w64-tools/genidl/src/genidl_typinfo.c mingw-w64-v5.0.1/mingw-w64-tools/genidl/src/genidl_typinfo.c
+--- mingw-w64-v5.0.1.orig/mingw-w64-tools/genidl/src/genidl_typinfo.c 2017-03-10 16:20:09.000000000 -0800
++++ mingw-w64-v5.0.1/mingw-w64-tools/genidl/src/genidl_typinfo.c 2017-03-10 16:25:49.000000000 -0800
+@@ -21,7 +21,10 @@
+ #include "genidl_cfg.h"
+ #include "genidl_typeinfo.h"
+ #include "genidl_typinfo.h"
++#if defined(HAVE_MALLOC_H)
+ #include <malloc.h>
++#endif
++#include <stdlib.h>
+ #include <string.h>
+ #include <memory.h>
+
diff --git a/patches/mingw-w64/v3.1.0/100-mingw64-malloc.patch b/patches/mingw-w64/v3.1.0/100-mingw64-malloc.patch
new file mode 100644
index 0000000..d9d5a61
--- /dev/null
+++ b/patches/mingw-w64/v3.1.0/100-mingw64-malloc.patch
@@ -0,0 +1,27 @@
+diff -urpN mingw-w64-v5.0.1.orig/mingw-w64-tools/genidl/src/genidl_cfg.h mingw-w64-v5.0.1/mingw-w64-tools/genidl/src/genidl_cfg.h
+--- mingw-w64-v5.0.1.orig/mingw-w64-tools/genidl/src/genidl_cfg.h 2017-03-10 16:20:09.000000000 -0800
++++ mingw-w64-v5.0.1/mingw-w64-tools/genidl/src/genidl_cfg.h 2017-03-10 16:25:26.000000000 -0800
+@@ -26,7 +26,9 @@
+ #include <stdio.h>
+ #include <stdlib.h>
+ #include <string.h>
++#if defined(HAVE_MALLOC_H)
+ #include <malloc.h>
++#endif
+ #include <memory.h>
+ #include <stdarg.h>
+ #include <stdint.h>
+diff -urpN mingw-w64-v5.0.1.orig/mingw-w64-tools/genidl/src/genidl_typinfo.c mingw-w64-v5.0.1/mingw-w64-tools/genidl/src/genidl_typinfo.c
+--- mingw-w64-v5.0.1.orig/mingw-w64-tools/genidl/src/genidl_typinfo.c 2017-03-10 16:20:09.000000000 -0800
++++ mingw-w64-v5.0.1/mingw-w64-tools/genidl/src/genidl_typinfo.c 2017-03-10 16:25:49.000000000 -0800
+@@ -21,7 +21,10 @@
+ #include "genidl_cfg.h"
+ #include "genidl_typeinfo.h"
+ #include "genidl_typinfo.h"
++#if defined(HAVE_MALLOC_H)
+ #include <malloc.h>
++#endif
++#include <stdlib.h>
+ #include <string.h>
+ #include <memory.h>
+
diff --git a/patches/mingw-w64/v3.2.0/100-mingw64-malloc.patch b/patches/mingw-w64/v3.2.0/100-mingw64-malloc.patch
new file mode 100644
index 0000000..d9d5a61
--- /dev/null
+++ b/patches/mingw-w64/v3.2.0/100-mingw64-malloc.patch
@@ -0,0 +1,27 @@
+diff -urpN mingw-w64-v5.0.1.orig/mingw-w64-tools/genidl/src/genidl_cfg.h mingw-w64-v5.0.1/mingw-w64-tools/genidl/src/genidl_cfg.h
+--- mingw-w64-v5.0.1.orig/mingw-w64-tools/genidl/src/genidl_cfg.h 2017-03-10 16:20:09.000000000 -0800
++++ mingw-w64-v5.0.1/mingw-w64-tools/genidl/src/genidl_cfg.h 2017-03-10 16:25:26.000000000 -0800
+@@ -26,7 +26,9 @@
+ #include <stdio.h>
+ #include <stdlib.h>
+ #include <string.h>
++#if defined(HAVE_MALLOC_H)
+ #include <malloc.h>
++#endif
+ #include <memory.h>
+ #include <stdarg.h>
+ #include <stdint.h>
+diff -urpN mingw-w64-v5.0.1.orig/mingw-w64-tools/genidl/src/genidl_typinfo.c mingw-w64-v5.0.1/mingw-w64-tools/genidl/src/genidl_typinfo.c
+--- mingw-w64-v5.0.1.orig/mingw-w64-tools/genidl/src/genidl_typinfo.c 2017-03-10 16:20:09.000000000 -0800
++++ mingw-w64-v5.0.1/mingw-w64-tools/genidl/src/genidl_typinfo.c 2017-03-10 16:25:49.000000000 -0800
+@@ -21,7 +21,10 @@
+ #include "genidl_cfg.h"
+ #include "genidl_typeinfo.h"
+ #include "genidl_typinfo.h"
++#if defined(HAVE_MALLOC_H)
+ #include <malloc.h>
++#endif
++#include <stdlib.h>
+ #include <string.h>
+ #include <memory.h>
+
diff --git a/patches/mingw-w64/v3.3.0/100-mingw64-malloc.patch b/patches/mingw-w64/v3.3.0/100-mingw64-malloc.patch
new file mode 100644
index 0000000..d9d5a61
--- /dev/null
+++ b/patches/mingw-w64/v3.3.0/100-mingw64-malloc.patch
@@ -0,0 +1,27 @@
+diff -urpN mingw-w64-v5.0.1.orig/mingw-w64-tools/genidl/src/genidl_cfg.h mingw-w64-v5.0.1/mingw-w64-tools/genidl/src/genidl_cfg.h
+--- mingw-w64-v5.0.1.orig/mingw-w64-tools/genidl/src/genidl_cfg.h 2017-03-10 16:20:09.000000000 -0800
++++ mingw-w64-v5.0.1/mingw-w64-tools/genidl/src/genidl_cfg.h 2017-03-10 16:25:26.000000000 -0800
+@@ -26,7 +26,9 @@
+ #include <stdio.h>
+ #include <stdlib.h>
+ #include <string.h>
++#if defined(HAVE_MALLOC_H)
+ #include <malloc.h>
++#endif
+ #include <memory.h>
+ #include <stdarg.h>
+ #include <stdint.h>
+diff -urpN mingw-w64-v5.0.1.orig/mingw-w64-tools/genidl/src/genidl_typinfo.c mingw-w64-v5.0.1/mingw-w64-tools/genidl/src/genidl_typinfo.c
+--- mingw-w64-v5.0.1.orig/mingw-w64-tools/genidl/src/genidl_typinfo.c 2017-03-10 16:20:09.000000000 -0800
++++ mingw-w64-v5.0.1/mingw-w64-tools/genidl/src/genidl_typinfo.c 2017-03-10 16:25:49.000000000 -0800
+@@ -21,7 +21,10 @@
+ #include "genidl_cfg.h"
+ #include "genidl_typeinfo.h"
+ #include "genidl_typinfo.h"
++#if defined(HAVE_MALLOC_H)
+ #include <malloc.h>
++#endif
++#include <stdlib.h>
+ #include <string.h>
+ #include <memory.h>
+
diff --git a/patches/mingw-w64/v4.0.0/100-mingw64-malloc.patch b/patches/mingw-w64/v4.0.0/100-mingw64-malloc.patch
new file mode 100644
index 0000000..d9d5a61
--- /dev/null
+++ b/patches/mingw-w64/v4.0.0/100-mingw64-malloc.patch
@@ -0,0 +1,27 @@
+diff -urpN mingw-w64-v5.0.1.orig/mingw-w64-tools/genidl/src/genidl_cfg.h mingw-w64-v5.0.1/mingw-w64-tools/genidl/src/genidl_cfg.h
+--- mingw-w64-v5.0.1.orig/mingw-w64-tools/genidl/src/genidl_cfg.h 2017-03-10 16:20:09.000000000 -0800
++++ mingw-w64-v5.0.1/mingw-w64-tools/genidl/src/genidl_cfg.h 2017-03-10 16:25:26.000000000 -0800
+@@ -26,7 +26,9 @@
+ #include <stdio.h>
+ #include <stdlib.h>
+ #include <string.h>
++#if defined(HAVE_MALLOC_H)
+ #include <malloc.h>
++#endif
+ #include <memory.h>
+ #include <stdarg.h>
+ #include <stdint.h>
+diff -urpN mingw-w64-v5.0.1.orig/mingw-w64-tools/genidl/src/genidl_typinfo.c mingw-w64-v5.0.1/mingw-w64-tools/genidl/src/genidl_typinfo.c
+--- mingw-w64-v5.0.1.orig/mingw-w64-tools/genidl/src/genidl_typinfo.c 2017-03-10 16:20:09.000000000 -0800
++++ mingw-w64-v5.0.1/mingw-w64-tools/genidl/src/genidl_typinfo.c 2017-03-10 16:25:49.000000000 -0800
+@@ -21,7 +21,10 @@
+ #include "genidl_cfg.h"
+ #include "genidl_typeinfo.h"
+ #include "genidl_typinfo.h"
++#if defined(HAVE_MALLOC_H)
+ #include <malloc.h>
++#endif
++#include <stdlib.h>
+ #include <string.h>
+ #include <memory.h>
+
diff --git a/patches/mingw-w64/v4.0.1/100-mingw64-malloc.patch b/patches/mingw-w64/v4.0.1/100-mingw64-malloc.patch
new file mode 100644
index 0000000..d9d5a61
--- /dev/null
+++ b/patches/mingw-w64/v4.0.1/100-mingw64-malloc.patch
@@ -0,0 +1,27 @@
+diff -urpN mingw-w64-v5.0.1.orig/mingw-w64-tools/genidl/src/genidl_cfg.h mingw-w64-v5.0.1/mingw-w64-tools/genidl/src/genidl_cfg.h
+--- mingw-w64-v5.0.1.orig/mingw-w64-tools/genidl/src/genidl_cfg.h 2017-03-10 16:20:09.000000000 -0800
++++ mingw-w64-v5.0.1/mingw-w64-tools/genidl/src/genidl_cfg.h 2017-03-10 16:25:26.000000000 -0800
+@@ -26,7 +26,9 @@
+ #include <stdio.h>
+ #include <stdlib.h>
+ #include <string.h>
++#if defined(HAVE_MALLOC_H)
+ #include <malloc.h>
++#endif
+ #include <memory.h>
+ #include <stdarg.h>
+ #include <stdint.h>
+diff -urpN mingw-w64-v5.0.1.orig/mingw-w64-tools/genidl/src/genidl_typinfo.c mingw-w64-v5.0.1/mingw-w64-tools/genidl/src/genidl_typinfo.c
+--- mingw-w64-v5.0.1.orig/mingw-w64-tools/genidl/src/genidl_typinfo.c 2017-03-10 16:20:09.000000000 -0800
++++ mingw-w64-v5.0.1/mingw-w64-tools/genidl/src/genidl_typinfo.c 2017-03-10 16:25:49.000000000 -0800
+@@ -21,7 +21,10 @@
+ #include "genidl_cfg.h"
+ #include "genidl_typeinfo.h"
+ #include "genidl_typinfo.h"
++#if defined(HAVE_MALLOC_H)
+ #include <malloc.h>
++#endif
++#include <stdlib.h>
+ #include <string.h>
+ #include <memory.h>
+
diff --git a/patches/mingw-w64/v4.0.2/100-mingw64-malloc.patch b/patches/mingw-w64/v4.0.2/100-mingw64-malloc.patch
new file mode 100644
index 0000000..d9d5a61
--- /dev/null
+++ b/patches/mingw-w64/v4.0.2/100-mingw64-malloc.patch
@@ -0,0 +1,27 @@
+diff -urpN mingw-w64-v5.0.1.orig/mingw-w64-tools/genidl/src/genidl_cfg.h mingw-w64-v5.0.1/mingw-w64-tools/genidl/src/genidl_cfg.h
+--- mingw-w64-v5.0.1.orig/mingw-w64-tools/genidl/src/genidl_cfg.h 2017-03-10 16:20:09.000000000 -0800
++++ mingw-w64-v5.0.1/mingw-w64-tools/genidl/src/genidl_cfg.h 2017-03-10 16:25:26.000000000 -0800
+@@ -26,7 +26,9 @@
+ #include <stdio.h>
+ #include <stdlib.h>
+ #include <string.h>
++#if defined(HAVE_MALLOC_H)
+ #include <malloc.h>
++#endif
+ #include <memory.h>
+ #include <stdarg.h>
+ #include <stdint.h>
+diff -urpN mingw-w64-v5.0.1.orig/mingw-w64-tools/genidl/src/genidl_typinfo.c mingw-w64-v5.0.1/mingw-w64-tools/genidl/src/genidl_typinfo.c
+--- mingw-w64-v5.0.1.orig/mingw-w64-tools/genidl/src/genidl_typinfo.c 2017-03-10 16:20:09.000000000 -0800
++++ mingw-w64-v5.0.1/mingw-w64-tools/genidl/src/genidl_typinfo.c 2017-03-10 16:25:49.000000000 -0800
+@@ -21,7 +21,10 @@
+ #include "genidl_cfg.h"
+ #include "genidl_typeinfo.h"
+ #include "genidl_typinfo.h"
++#if defined(HAVE_MALLOC_H)
+ #include <malloc.h>
++#endif
++#include <stdlib.h>
+ #include <string.h>
+ #include <memory.h>
+
diff --git a/patches/mingw-w64/v4.0.4/100-mingw64-malloc.patch b/patches/mingw-w64/v4.0.4/100-mingw64-malloc.patch
new file mode 100644
index 0000000..d9d5a61
--- /dev/null
+++ b/patches/mingw-w64/v4.0.4/100-mingw64-malloc.patch
@@ -0,0 +1,27 @@
+diff -urpN mingw-w64-v5.0.1.orig/mingw-w64-tools/genidl/src/genidl_cfg.h mingw-w64-v5.0.1/mingw-w64-tools/genidl/src/genidl_cfg.h
+--- mingw-w64-v5.0.1.orig/mingw-w64-tools/genidl/src/genidl_cfg.h 2017-03-10 16:20:09.000000000 -0800
++++ mingw-w64-v5.0.1/mingw-w64-tools/genidl/src/genidl_cfg.h 2017-03-10 16:25:26.000000000 -0800
+@@ -26,7 +26,9 @@
+ #include <stdio.h>
+ #include <stdlib.h>
+ #include <string.h>
++#if defined(HAVE_MALLOC_H)
+ #include <malloc.h>
++#endif
+ #include <memory.h>
+ #include <stdarg.h>
+ #include <stdint.h>
+diff -urpN mingw-w64-v5.0.1.orig/mingw-w64-tools/genidl/src/genidl_typinfo.c mingw-w64-v5.0.1/mingw-w64-tools/genidl/src/genidl_typinfo.c
+--- mingw-w64-v5.0.1.orig/mingw-w64-tools/genidl/src/genidl_typinfo.c 2017-03-10 16:20:09.000000000 -0800
++++ mingw-w64-v5.0.1/mingw-w64-tools/genidl/src/genidl_typinfo.c 2017-03-10 16:25:49.000000000 -0800
+@@ -21,7 +21,10 @@
+ #include "genidl_cfg.h"
+ #include "genidl_typeinfo.h"
+ #include "genidl_typinfo.h"
++#if defined(HAVE_MALLOC_H)
+ #include <malloc.h>
++#endif
++#include <stdlib.h>
+ #include <string.h>
+ #include <memory.h>
+
diff --git a/patches/mingw-w64/v4.0.5/100-mingw64-malloc.patch b/patches/mingw-w64/v4.0.5/100-mingw64-malloc.patch
new file mode 100644
index 0000000..d9d5a61
--- /dev/null
+++ b/patches/mingw-w64/v4.0.5/100-mingw64-malloc.patch
@@ -0,0 +1,27 @@
+diff -urpN mingw-w64-v5.0.1.orig/mingw-w64-tools/genidl/src/genidl_cfg.h mingw-w64-v5.0.1/mingw-w64-tools/genidl/src/genidl_cfg.h
+--- mingw-w64-v5.0.1.orig/mingw-w64-tools/genidl/src/genidl_cfg.h 2017-03-10 16:20:09.000000000 -0800
++++ mingw-w64-v5.0.1/mingw-w64-tools/genidl/src/genidl_cfg.h 2017-03-10 16:25:26.000000000 -0800
+@@ -26,7 +26,9 @@
+ #include <stdio.h>
+ #include <stdlib.h>
+ #include <string.h>
++#if defined(HAVE_MALLOC_H)
+ #include <malloc.h>
++#endif
+ #include <memory.h>
+ #include <stdarg.h>
+ #include <stdint.h>
+diff -urpN mingw-w64-v5.0.1.orig/mingw-w64-tools/genidl/src/genidl_typinfo.c mingw-w64-v5.0.1/mingw-w64-tools/genidl/src/genidl_typinfo.c
+--- mingw-w64-v5.0.1.orig/mingw-w64-tools/genidl/src/genidl_typinfo.c 2017-03-10 16:20:09.000000000 -0800
++++ mingw-w64-v5.0.1/mingw-w64-tools/genidl/src/genidl_typinfo.c 2017-03-10 16:25:49.000000000 -0800
+@@ -21,7 +21,10 @@
+ #include "genidl_cfg.h"
+ #include "genidl_typeinfo.h"
+ #include "genidl_typinfo.h"
++#if defined(HAVE_MALLOC_H)
+ #include <malloc.h>
++#endif
++#include <stdlib.h>
+ #include <string.h>
+ #include <memory.h>
+
diff --git a/patches/mingw-w64/v4.0.6/100-mingw64-malloc.patch b/patches/mingw-w64/v4.0.6/100-mingw64-malloc.patch
new file mode 100644
index 0000000..d9d5a61
--- /dev/null
+++ b/patches/mingw-w64/v4.0.6/100-mingw64-malloc.patch
@@ -0,0 +1,27 @@
+diff -urpN mingw-w64-v5.0.1.orig/mingw-w64-tools/genidl/src/genidl_cfg.h mingw-w64-v5.0.1/mingw-w64-tools/genidl/src/genidl_cfg.h
+--- mingw-w64-v5.0.1.orig/mingw-w64-tools/genidl/src/genidl_cfg.h 2017-03-10 16:20:09.000000000 -0800
++++ mingw-w64-v5.0.1/mingw-w64-tools/genidl/src/genidl_cfg.h 2017-03-10 16:25:26.000000000 -0800
+@@ -26,7 +26,9 @@
+ #include <stdio.h>
+ #include <stdlib.h>
+ #include <string.h>
++#if defined(HAVE_MALLOC_H)
+ #include <malloc.h>
++#endif
+ #include <memory.h>
+ #include <stdarg.h>
+ #include <stdint.h>
+diff -urpN mingw-w64-v5.0.1.orig/mingw-w64-tools/genidl/src/genidl_typinfo.c mingw-w64-v5.0.1/mingw-w64-tools/genidl/src/genidl_typinfo.c
+--- mingw-w64-v5.0.1.orig/mingw-w64-tools/genidl/src/genidl_typinfo.c 2017-03-10 16:20:09.000000000 -0800
++++ mingw-w64-v5.0.1/mingw-w64-tools/genidl/src/genidl_typinfo.c 2017-03-10 16:25:49.000000000 -0800
+@@ -21,7 +21,10 @@
+ #include "genidl_cfg.h"
+ #include "genidl_typeinfo.h"
+ #include "genidl_typinfo.h"
++#if defined(HAVE_MALLOC_H)
+ #include <malloc.h>
++#endif
++#include <stdlib.h>
+ #include <string.h>
+ #include <memory.h>
+
diff --git a/patches/mingw-w64/v5.0.0/100-mingw64-malloc.patch b/patches/mingw-w64/v5.0.0/100-mingw64-malloc.patch
new file mode 100644
index 0000000..3d05b63
--- /dev/null
+++ b/patches/mingw-w64/v5.0.0/100-mingw64-malloc.patch
@@ -0,0 +1,55 @@
+diff -urpN mingw-w64-v5.0.1.orig/mingw-w64-tools/genidl/src/genidl_cfg.h mingw-w64-v5.0.1/mingw-w64-tools/genidl/src/genidl_cfg.h
+--- mingw-w64-v5.0.1.orig/mingw-w64-tools/genidl/src/genidl_cfg.h 2017-03-10 16:20:09.000000000 -0800
++++ mingw-w64-v5.0.1/mingw-w64-tools/genidl/src/genidl_cfg.h 2017-03-10 16:25:26.000000000 -0800
+@@ -26,7 +26,9 @@
+ #include <stdio.h>
+ #include <stdlib.h>
+ #include <string.h>
++#if defined(HAVE_MALLOC_H)
+ #include <malloc.h>
++#endif
+ #include <memory.h>
+ #include <stdarg.h>
+ #include <stdint.h>
+diff -urpN mingw-w64-v5.0.1.orig/mingw-w64-tools/genidl/src/genidl_typinfo.c mingw-w64-v5.0.1/mingw-w64-tools/genidl/src/genidl_typinfo.c
+--- mingw-w64-v5.0.1.orig/mingw-w64-tools/genidl/src/genidl_typinfo.c 2017-03-10 16:20:09.000000000 -0800
++++ mingw-w64-v5.0.1/mingw-w64-tools/genidl/src/genidl_typinfo.c 2017-03-10 16:25:49.000000000 -0800
+@@ -21,7 +21,10 @@
+ #include "genidl_cfg.h"
+ #include "genidl_typeinfo.h"
+ #include "genidl_typinfo.h"
++#if defined(HAVE_MALLOC_H)
+ #include <malloc.h>
++#endif
++#include <stdlib.h>
+ #include <string.h>
+ #include <memory.h>
+
+diff -urpN mingw-w64-v5.0.1.orig/mingw-w64-tools/widl/include/pathtools.h mingw-w64-v5.0.1/mingw-w64-tools/widl/include/pathtools.h
+--- mingw-w64-v5.0.1.orig/mingw-w64-tools/widl/include/pathtools.h 2017-03-10 16:20:09.000000000 -0800
++++ mingw-w64-v5.0.1/mingw-w64-tools/widl/include/pathtools.h 2017-03-10 16:26:21.000000000 -0800
+@@ -12,9 +12,8 @@
+ #define PATHTOOLS_H
+
+ #include <unistd.h>
+-#if defined(__APPLE__)
+ #include <stdlib.h>
+-#else
++#if defined(HAVE_MALLOC_H)
+ #include <malloc.h>
+ #endif
+ #include <stdio.h>
+diff -urpN mingw-w64-v5.0.1.orig/mingw-w64-tools/widl/src/pathtools.c mingw-w64-v5.0.1/mingw-w64-tools/widl/src/pathtools.c
+--- mingw-w64-v5.0.1.orig/mingw-w64-tools/widl/src/pathtools.c 2017-03-10 16:20:09.000000000 -0800
++++ mingw-w64-v5.0.1/mingw-w64-tools/widl/src/pathtools.c 2017-03-10 16:26:40.000000000 -0800
+@@ -8,9 +8,8 @@
+ .email: <mingw.android@gmail.com>.
+ */
+
+-#if defined(__APPLE__)
+ #include <stdlib.h>
+-#else
++#if defined(HAVE_MALLOC_H)
+ #include <malloc.h>
+ #endif
+ #include <limits.h>
diff --git a/patches/mingw-w64/v5.0.1/100-mingw64-malloc.patch b/patches/mingw-w64/v5.0.1/100-mingw64-malloc.patch
new file mode 100644
index 0000000..3d05b63
--- /dev/null
+++ b/patches/mingw-w64/v5.0.1/100-mingw64-malloc.patch
@@ -0,0 +1,55 @@
+diff -urpN mingw-w64-v5.0.1.orig/mingw-w64-tools/genidl/src/genidl_cfg.h mingw-w64-v5.0.1/mingw-w64-tools/genidl/src/genidl_cfg.h
+--- mingw-w64-v5.0.1.orig/mingw-w64-tools/genidl/src/genidl_cfg.h 2017-03-10 16:20:09.000000000 -0800
++++ mingw-w64-v5.0.1/mingw-w64-tools/genidl/src/genidl_cfg.h 2017-03-10 16:25:26.000000000 -0800
+@@ -26,7 +26,9 @@
+ #include <stdio.h>
+ #include <stdlib.h>
+ #include <string.h>
++#if defined(HAVE_MALLOC_H)
+ #include <malloc.h>
++#endif
+ #include <memory.h>
+ #include <stdarg.h>
+ #include <stdint.h>
+diff -urpN mingw-w64-v5.0.1.orig/mingw-w64-tools/genidl/src/genidl_typinfo.c mingw-w64-v5.0.1/mingw-w64-tools/genidl/src/genidl_typinfo.c
+--- mingw-w64-v5.0.1.orig/mingw-w64-tools/genidl/src/genidl_typinfo.c 2017-03-10 16:20:09.000000000 -0800
++++ mingw-w64-v5.0.1/mingw-w64-tools/genidl/src/genidl_typinfo.c 2017-03-10 16:25:49.000000000 -0800
+@@ -21,7 +21,10 @@
+ #include "genidl_cfg.h"
+ #include "genidl_typeinfo.h"
+ #include "genidl_typinfo.h"
++#if defined(HAVE_MALLOC_H)
+ #include <malloc.h>
++#endif
++#include <stdlib.h>
+ #include <string.h>
+ #include <memory.h>
+
+diff -urpN mingw-w64-v5.0.1.orig/mingw-w64-tools/widl/include/pathtools.h mingw-w64-v5.0.1/mingw-w64-tools/widl/include/pathtools.h
+--- mingw-w64-v5.0.1.orig/mingw-w64-tools/widl/include/pathtools.h 2017-03-10 16:20:09.000000000 -0800
++++ mingw-w64-v5.0.1/mingw-w64-tools/widl/include/pathtools.h 2017-03-10 16:26:21.000000000 -0800
+@@ -12,9 +12,8 @@
+ #define PATHTOOLS_H
+
+ #include <unistd.h>
+-#if defined(__APPLE__)
+ #include <stdlib.h>
+-#else
++#if defined(HAVE_MALLOC_H)
+ #include <malloc.h>
+ #endif
+ #include <stdio.h>
+diff -urpN mingw-w64-v5.0.1.orig/mingw-w64-tools/widl/src/pathtools.c mingw-w64-v5.0.1/mingw-w64-tools/widl/src/pathtools.c
+--- mingw-w64-v5.0.1.orig/mingw-w64-tools/widl/src/pathtools.c 2017-03-10 16:20:09.000000000 -0800
++++ mingw-w64-v5.0.1/mingw-w64-tools/widl/src/pathtools.c 2017-03-10 16:26:40.000000000 -0800
+@@ -8,9 +8,8 @@
+ .email: <mingw.android@gmail.com>.
+ */
+
+-#if defined(__APPLE__)
+ #include <stdlib.h>
+-#else
++#if defined(HAVE_MALLOC_H)
+ #include <malloc.h>
+ #endif
+ #include <limits.h>