For __MINGW32__, we need to include <stdlib.h> for malloc.
gcc/ada/ChangeLog:
PR ada/123037
* rtinit.c: Include <stdlib.h> for __MINGW32__.
---
OK? I can swap the order of includes if preferred so stdlib.h comes before
windows.h,
but I'm not familiar enough with Windows and I wasn't sure if <windows.h> would
ever
set macros that stdlib.h needs.
gcc/ada/rtinit.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/gcc/ada/rtinit.c b/gcc/ada/rtinit.c
index 598550c4051c..32c78d1f3c8b 100644
--- a/gcc/ada/rtinit.c
+++ b/gcc/ada/rtinit.c
@@ -73,6 +73,7 @@ int __gnat_rt_init_count = 0;
#define WIN32_LEAN_AND_MEAN
#include "mingw32.h"
#include <windows.h>
+#include <stdlib.h>
extern void __gnat_init_float (void);
--
2.52.0