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

Skip to content

Commit ea34a84

Browse files
committed
Patch from Lorenzo M. Catucci:
I discovered the [MREMAP_MAYMOVE] symbol is only defined when _GNU_SOURCE is defined; therefore, here is the change: if we are compiling for linux, define _GNU_SOURCE before including mman.h, and all is done.
1 parent e475e70 commit ea34a84

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

Modules/mmapmodule.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,11 @@
1616
/ ftp://squirl.nightmare.com/pub/python/python-ext.
1717
*/
1818

19+
#ifdef __linux__
20+
#define _GNU_SOURCE /* So we can get MREMAP_MAYMOVE defined when
21+
sys/mman.h is included */
22+
#endif
23+
1924
#include <Python.h>
2025

2126
#ifndef MS_WIN32

0 commit comments

Comments
 (0)