env_universal_common: drop MAP_FILE flag

MAP_FILE is unspecified or ignored on Linux, Solaris, FreeBSD and Haiku;
it is the default on OS X.

Work on #3317 & #3340.
This commit is contained in:
David Adam 2016-08-30 21:43:25 +08:00
parent 3702616b60
commit 35bee00802

View file

@ -1043,7 +1043,7 @@ class universal_notifier_shmem_poller_t : public universal_notifier_t {
// Memory map the region.
if (!errored) {
void *addr = mmap(NULL, sizeof(universal_notifier_shmem_t), PROT_READ | PROT_WRITE,
MAP_FILE | MAP_SHARED, fd, 0);
MAP_SHARED, fd, 0);
if (addr == MAP_FAILED) {
int err = errno;
report_error(err, L"Unable to memory map shared memory object with path '%s'",