diff --git a/Doc/library/mmap.rst b/Doc/library/mmap.rst --- a/Doc/library/mmap.rst +++ b/Doc/library/mmap.rst @@ -88,7 +88,8 @@ To ensure validity of the created memory mapping the file specified by the descriptor *fileno* is internally automatically synchronized - with physical backing store on Mac OS X and OpenVMS. + with physical backing store on operating systems where this is + necessary, e.g. OpenVMS, or buggy versions of Mac OS X. This example shows a simple way of using :class:`mmap`:: diff --git a/Modules/mmapmodule.c b/Modules/mmapmodule.c --- a/Modules/mmapmodule.c +++ b/Modules/mmapmodule.c @@ -1125,7 +1125,7 @@ "mmap invalid access parameter."); } -#ifdef __APPLE__ +#if defined __APPLE__ && !defined __MAC_10_7 /* Issue #11277: fsync(2) is not enough on OS X - a special, OS X specific fcntl(2) is necessary to force DISKSYNC and get around mmap(2) bug */ if (fd != -1)