summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
-rw-r--r--py/builtinimport.c6
-rw-r--r--py/objfun.c6
-rw-r--r--windows/alloca.h1
3 files changed, 3 insertions, 10 deletions
diff --git a/py/builtinimport.c b/py/builtinimport.c
index 323b63ef61..f4e089b5d8 100644
--- a/py/builtinimport.c
+++ b/py/builtinimport.c
@@ -1,12 +1,8 @@
#include <stdint.h>
-#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <assert.h>
-#ifdef __MINGW32__
-// For alloca()
-#include <malloc.h>
-#endif
+#include <alloca.h>
#include "mpconfig.h"
#include "nlr.h"
diff --git a/py/objfun.c b/py/objfun.c
index e0c25771e1..2855c7452b 100644
--- a/py/objfun.c
+++ b/py/objfun.c
@@ -1,11 +1,7 @@
#include <stdbool.h>
-#include <stdlib.h>
#include <string.h>
#include <assert.h>
-#ifdef __MINGW32__
-// For alloca()
-#include <malloc.h>
-#endif
+#include <alloca.h>
#include "mpconfig.h"
#include "nlr.h"
diff --git a/windows/alloca.h b/windows/alloca.h
new file mode 100644
index 0000000000..f8fa6f17a0
--- /dev/null
+++ b/windows/alloca.h
@@ -0,0 +1 @@
+#include <malloc.h>