From 425c24e5da3fdd2a716d9f545faafddcac99334b Mon Sep 17 00:00:00 2001 From: Bruce Evans Date: Sun, 24 Mar 2019 16:47:43 +0000 Subject: Fix libvgl to not always fail to initialize due to its invalid mmap() args (neither MAP_PRIVATE nor MAP_SHARED). It was broken in r271635 and/or r271724 by stricter checking. The compatibility code in r271724 doesn't work for my old binaries (actually new binaries with old libraries). PR: needed to test the fix for PR 162373 --- lib/libvgl/main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/libvgl') diff --git a/lib/libvgl/main.c b/lib/libvgl/main.c index b78ce6cd5255..99563727ecb0 100644 --- a/lib/libvgl/main.c +++ b/lib/libvgl/main.c @@ -301,7 +301,7 @@ VGLInit(int mode) VGLDisplay->Yorigin = 0; VGLMem = (byte*)mmap(0, VGLAdpInfo.va_window_size, PROT_READ|PROT_WRITE, - MAP_FILE, 0, 0); + MAP_FILE | MAP_SHARED, 0, 0); if (VGLMem == MAP_FAILED) { VGLEnd(); return -7; @@ -350,7 +350,7 @@ VGLCheckSwitch() ioctl(0, VGLMode, 0); VGLCurWindow = 0; VGLMem = (byte*)mmap(0, VGLAdpInfo.va_window_size, PROT_READ|PROT_WRITE, - MAP_FILE, 0, 0); + MAP_FILE | MAP_SHARED, 0, 0); /* XXX: what if mmap() has failed! */ VGLDisplay->Type = VIDBUF8; /* XXX */ -- cgit v1.2.3