summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorBarry Warsaw <barry@python.org>2011-07-19 21:06:30 (GMT)
committerBarry Warsaw <barry@python.org>2011-07-19 21:06:30 (GMT)
commitc56432804a5d2029c080843fe90680246f924d35 (patch)
tree611ed89bef17bdc3f63763abda458fc523baa135 /Modules
parent39540a02264998c5682eaa12d6e5ce6713b9056e (diff)
downloadcpython-c56432804a5d2029c080843fe90680246f924d35.zip
cpython-c56432804a5d2029c080843fe90680246f924d35.tar.gz
cpython-c56432804a5d2029c080843fe90680246f924d35.tar.bz2
- Issue #10309: Define _GNU_SOURCE so that mremap() gets the proper
signature. Without this, architectures where sizeof void* != sizeof int are broken. Patch given by Hallvard B Furuseth.
Diffstat (limited to 'Modules')
-rw-r--r--Modules/_ctypes/libffi/src/dlmalloc.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/Modules/_ctypes/libffi/src/dlmalloc.c b/Modules/_ctypes/libffi/src/dlmalloc.c
index 783c5c2..582ddc3 100644
--- a/Modules/_ctypes/libffi/src/dlmalloc.c
+++ b/Modules/_ctypes/libffi/src/dlmalloc.c
@@ -457,6 +457,11 @@ DEFAULT_MMAP_THRESHOLD default: 256K
#define LACKS_ERRNO_H
#define MALLOC_FAILURE_ACTION
#define MMAP_CLEARS 0 /* WINCE and some others apparently don't clear */
+#elif !defined _GNU_SOURCE
+/* mremap() on Linux requires this via sys/mman.h
+ * See roundup issue 10309
+ */
+#define _GNU_SOURCE 1
#endif /* WIN32 */
#if defined(DARWIN) || defined(_DARWIN)