From 910bfb7bebac3e49bcdf8f08006346ee3748d1bd Mon Sep 17 00:00:00 2001 From: "Gregory P. Smith" Date: Tue, 30 Apr 2013 00:05:25 -0700 Subject: [PATCH] This local change was lost during the fixing of issue17192 to update libffi to 3.0.13. (i'm not sure if it is needed anymore but see issue 10309 for details which makes no mention of upstream; this change is already in 3.3 and 3.4 but may need reapplying to 2.7 as done here) --- Modules/_ctypes/libffi/src/dlmalloc.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Modules/_ctypes/libffi/src/dlmalloc.c b/Modules/_ctypes/libffi/src/dlmalloc.c index 5c9f9c2d23..2773953590 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 */ #ifdef __OS2__ -- 2.40.0