Message120391
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. |
|
Date |
User |
Action |
Args |
2010-11-04 11:43:47 | hfuru | set | recipients:
+ hfuru |
2010-11-04 11:43:47 | hfuru | set | messageid: <1288871027.11.0.979430970782.issue10309@psf.upfronthosting.co.za> |
2010-11-04 11:43:44 | hfuru | link | issue10309 messages |
2010-11-04 11:43:43 | hfuru | create | |
|