diff options
Diffstat (limited to 'Modules/mmapmodule.c')
-rw-r--r-- | Modules/mmapmodule.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/Modules/mmapmodule.c b/Modules/mmapmodule.c index 33366b2..917c636 100644 --- a/Modules/mmapmodule.c +++ b/Modules/mmapmodule.c @@ -1164,6 +1164,13 @@ new_mmap_object(PyTypeObject *type, PyObject *args, PyObject *kwdict) #ifdef MAP_ANONYMOUS /* BSD way to map anonymous memory */ flags |= MAP_ANONYMOUS; + + /* VxWorks only supports MAP_ANONYMOUS with MAP_PRIVATE flag */ +#ifdef __VXWORKS__ + flags &= ~MAP_SHARED; + flags |= MAP_PRIVATE; +#endif + #else /* SVR4 method to map anonymous memory is to open /dev/zero */ fd = devzero = _Py_open("/dev/zero", O_RDWR); |