mirror of
https://git.FreeBSD.org/ports.git
synced 2024-11-24 00:45:52 +00:00
- Fix MIT-SHM problem.
- Bump PORTREVISION. Qt raster graphics system engine tries to attach to shared memory segments marked for removal, which is forbidden by POSIX (shmctl(2)). Backport a fix to invert order of operations. The issue was triggered by Marble and KDE-Games, which resulted in blank windows. PR: 164742 Approved by: portmgr via miwi Obtained from: Qt Project Feature safe: yes
This commit is contained in:
parent
7c4754ad30
commit
492e3e6a29
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=293225
@ -8,6 +8,7 @@
|
||||
|
||||
PORTNAME= gui
|
||||
DISTVERSION= ${QT4_VERSION}
|
||||
PORTREVISION= 1
|
||||
CATEGORIES?= x11-toolkits
|
||||
PKGNAMEPREFIX= qt4-
|
||||
|
||||
|
@ -0,0 +1,23 @@
|
||||
--- ./src/gui/image/qnativeimage.cpp.orig 2012-03-12 13:30:21.000000000 +0100
|
||||
+++ ./src/gui/image/qnativeimage.cpp 2012-03-12 13:32:39.000000000 +0100
|
||||
@@ -178,15 +178,17 @@
|
||||
if (ok) {
|
||||
xshmimg->data = (char*)shmat(xshminfo.shmid, 0, 0);
|
||||
xshminfo.shmaddr = xshmimg->data;
|
||||
- if (shmctl(xshminfo.shmid, IPC_RMID, 0) == -1)
|
||||
- qWarning() << "Error while marking the shared memory segment to be destroyed";
|
||||
ok = (xshminfo.shmaddr != (char*)-1);
|
||||
if (ok)
|
||||
image = QImage((uchar *)xshmimg->data, width, height, format);
|
||||
}
|
||||
xshminfo.readOnly = false;
|
||||
- if (ok)
|
||||
+ if (ok) {
|
||||
ok = XShmAttach(X11->display, &xshminfo);
|
||||
+ XSync(X11->display, False);
|
||||
+ if (shmctl(xshminfo.shmid, IPC_RMID, 0) == -1)
|
||||
+ qWarning() << "Error while marking the shared memory segment to be destroyed";
|
||||
+ }
|
||||
if (!ok) {
|
||||
qWarning() << "QNativeImage: Unable to attach to shared memory segment.";
|
||||
if (xshmimg->data) {
|
Loading…
Reference in New Issue
Block a user