New submission from Hallvard B Furuseth <h.b.furus...@usit.uio.no>: dlmalloc uses mremap() which is undeclared on Linux, needs _GNU_SOURCE. This can break at least on hosts where void* = 64 bits and int (default return type) 32 bits, since some bits in the return type are lost.
A minimal patch is: --- Modules/_ctypes/libffi/src/dlmalloc.c +++ Modules/_ctypes/libffi/src/dlmalloc.c @@ -459,2 +459,4 @@ #define MMAP_CLEARS 0 /* WINCE and some others apparently don't clear */ +#elif !defined _GNU_SOURCE +#define _GNU_SOURCE 1 /* mremap() in Linux sys/mman.h */ #endif /* WIN32 */ However the (char*)CALL_MREMAP() cast looks like a broken fix for this, it suppresses a warning instead of fixing it. Maybe you should remove the cast and instead assign CALL_MREMAP() to a void*, to catch any similar trouble in the future. ---------- components: Extension Modules messages: 120391 nosy: hfuru priority: normal severity: normal status: open title: dlmalloc.c needs _GNU_SOURCE for mremap() type: behavior versions: Python 3.2 _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue10309> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com