summaryrefslogtreecommitdiffstats
path: root/redhat/applications/kmplayer/kmplayer-3.5.13-fix_gcc47_compilation.patch
blob: 02962e25607d7feaff198ee962e6a9c498eae3f2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
commit 5106117b5c1439d3fee08395c1a025f62d30a53e
Author: Darrell Anderson <humanreadable@yahoo.com>
Date:   1335631986 -0500

    GCC 4.7 fixes.

diff --git a/src/gstplayer.cpp b/src/gstplayer.cpp
index ebf7b0d..c4bf580 100644
--- a/src/gstplayer.cpp
+++ b/src/gstplayer.cpp
@@ -1003,11 +1003,16 @@ int main(int argc, char **argv) {
     gstapp->exec ();
 
     XLockDisplay(display);
-    XClientMessageEvent ev = {
-        ClientMessage, 0, true, display, wid, 
-        XInternAtom (display, "XVIDEO", false), 8, {b: "quit_now"}
-    };
-    XSendEvent (display, wid, false, StructureNotifyMask, (XEvent *) & ev);
+    XEvent ev;
+    ev.xclient.type = ClientMessage;
+    ev.xclient.serial = 0;
+    ev.xclient.send_event = true;
+    ev.xclient.display = display;
+    ev.xclient.window = wid;
+    ev.xclient.message_type = XInternAtom (display, "XVIDEO", false);
+    ev.xclient.format = 8;
+    strcpy(ev.xclient.data.b, "quit_now");
+    XSendEvent (display, wid, false, StructureNotifyMask, &ev);
     XFlush (display);
     XUnlockDisplay(display);
     eventThread->wait (500);
diff --git a/src/kmplayerapp.cpp b/src/kmplayerapp.cpp
index 27b26cd..bdeac91 100644
--- a/src/kmplayerapp.cpp
+++ b/src/kmplayerapp.cpp
@@ -17,6 +17,8 @@
 
 #undef Always
 
+#include <unistd.h>
+
 // include files for QT
 #include <tqdatastream.h>
 #include <tqregexp.h>