mirror of
https://github.com/freebsd/freebsd-src
synced 2024-07-21 18:27:22 +00:00
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
This commit is contained in:
parent
803fff9065
commit
425c24e5da
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=345474
|
@ -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 */
|
||||
|
|
Loading…
Reference in a new issue