summaryrefslogtreecommitdiff
path: root/Modules
diff options
context:
space:
mode:
Diffstat (limited to 'Modules')
-rw-r--r--Modules/Setup.stdlib.in2
-rw-r--r--Modules/_ctypes/callproc.c3
-rw-r--r--Modules/_ctypes/malloc_closure.c3
3 files changed, 7 insertions, 1 deletions
diff --git a/Modules/Setup.stdlib.in b/Modules/Setup.stdlib.in
index 2730030a15..a199aefc51 100644
--- a/Modules/Setup.stdlib.in
+++ b/Modules/Setup.stdlib.in
@@ -136,7 +136,7 @@
#
# needs -lffi and -ldl
-#@MODULE__CTYPES_TRUE@_ctypes _ctypes/_ctypes.c _ctypes/callbacks.c _ctypes/callproc.c _ctypes/stgdict.c _ctypes/cfield.c
+@MODULE__CTYPES_TRUE@_ctypes _ctypes/_ctypes.c _ctypes/callbacks.c _ctypes/callproc.c _ctypes/stgdict.c _ctypes/cfield.c @MODULE__CTYPES_MALLOC_CLOSURE@
# needs -lncurses, -lncursesw or -lcurses, sometimes -ltermcap
#@MODULE__CURSES_TRUE@_curses _cursesmodule.c
diff --git a/Modules/_ctypes/callproc.c b/Modules/_ctypes/callproc.c
index 3fab9ad0c1..fa1dfac6c7 100644
--- a/Modules/_ctypes/callproc.c
+++ b/Modules/_ctypes/callproc.c
@@ -54,6 +54,9 @@
*/
+#ifndef Py_BUILD_CORE_BUILTIN
+# define Py_BUILD_CORE_MODULE 1
+#endif
#define NEEDS_PY_IDENTIFIER
#include "Python.h"
diff --git a/Modules/_ctypes/malloc_closure.c b/Modules/_ctypes/malloc_closure.c
index 38edc90e70..d47153f1d7 100644
--- a/Modules/_ctypes/malloc_closure.c
+++ b/Modules/_ctypes/malloc_closure.c
@@ -1,3 +1,6 @@
+#ifndef Py_BUILD_CORE_BUILTIN
+# define Py_BUILD_CORE_MODULE 1
+#endif
#include <Python.h>
#include <ffi.h>
#ifdef MS_WIN32