Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit d460a76

Browse files
committed
- 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.
1 parent 4634676 commit d460a76

2 files changed

Lines changed: 14 additions & 2 deletions

File tree

Misc/NEWS

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ Core and Builtins
1414
format string that contains positional fields. Initial patch by
1515
Julian Berman.
1616

17-
- Issue #11627: Fix segfault when __new__ on a exception returns a non-exception
18-
class.
17+
- Issue #11627: Fix segfault when __new__ on a exception returns a
18+
non-exception class.
1919

2020
- Issue #12149: Update the method cache after a type's dictionnary gets
2121
cleared by the garbage collector. This fixes a segfault when an instance
@@ -71,6 +71,13 @@ Library
7171
- Issue #12451: xml.dom.pulldom: parse() now opens files in binary mode instead
7272
of the text mode (using the locale encoding) to avoid encoding issues.
7373

74+
Extension Modules
75+
-----------------
76+
77+
- Issue #10309: Define _GNU_SOURCE so that mremap() gets the proper
78+
signature. Without this, architectures where sizeof void* != sizeof int are
79+
broken. Patch given by Hallvard B Furuseth.
80+
7481
C-API
7582
-----
7683

Modules/_ctypes/libffi/src/dlmalloc.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -457,6 +457,11 @@ DEFAULT_MMAP_THRESHOLD default: 256K
457457
#define LACKS_ERRNO_H
458458
#define MALLOC_FAILURE_ACTION
459459
#define MMAP_CLEARS 0 /* WINCE and some others apparently don't clear */
460+
#elif !defined _GNU_SOURCE
461+
/* mremap() on Linux requires this via sys/mman.h
462+
* See roundup issue 10309
463+
*/
464+
#define _GNU_SOURCE 1
460465
#endif /* WIN32 */
461466

462467
#if defined(DARWIN) || defined(_DARWIN)

0 commit comments

Comments
 (0)