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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
--- src/CMakeLists.txt	2010-11-22 04:31:15.000000000 +0100
+++ src2/CMakeLists.txt	2012-05-20 04:24:20.981056947 +0200
@@ -123,7 +123,10 @@
     ${QT_QTDBUS_LIBRARY}
     ${QT_QTNETWORK_LIBRARY}
     ${CWIID_LIBRARY}
-  )
+rt
+dl
+pthread  
+)
 
   install(TARGETS wiimotedev-daemon DESTINATION ${WIIMOTEDEV_SBIN_DIR})
 endif(BUILD_DAEMON)
@@ -136,7 +139,10 @@
     ${QT_QTCORE_LIBRARY}
     ${QT_QTDBUS_LIBRARY}
     ${QT_QTNETWORK_LIBRARY}
-  )
+rt
+dl
+pthread  
+)
 
   install(TARGETS wiimotedev-client DESTINATION ${WIIMOTEDEV_SBIN_DIR})
 endif(BUILD_CLIENT)
@@ -148,6 +154,9 @@
   target_link_libraries(wiimotedev-uinput
     ${QT_QTCORE_LIBRARY}
     ${QT_QTDBUS_LIBRARY}
+rt
+dl
+pthread
   )
 
   install(TARGETS wiimotedev-uinput DESTINATION ${WIIMOTEDEV_SBIN_DIR})
diff -Naur src/devices/classicgamepad.cpp src2/devices/classicgamepad.cpp
--- src/devices/classicgamepad.cpp	2010-11-22 04:31:15.000000000 +0100
+++ src2/devices/classicgamepad.cpp	2012-05-20 04:24:20.994390228 +0200
@@ -18,7 +18,7 @@
  **********************************************************************************/
 
 #include "devices/classicgamepad.h"
-
+#include <unistd.h>
 ClassicGamepadDevice::ClassicGamepadDevice(QString deviceName) :
   UInputObject(),
   deviceName(deviceName)
diff -Naur src/devices/eventdevice.cpp src2/devices/eventdevice.cpp
--- src/devices/eventdevice.cpp	2010-11-22 04:31:15.000000000 +0100
+++ src2/devices/eventdevice.cpp	2012-05-20 04:24:20.994390228 +0200
@@ -18,7 +18,7 @@
  **********************************************************************************/
 
 #include "devices/eventdevice.h"
-
+#include <unistd.h>
 bool UInputEvent::uinput_open(bool replay){
   if (alreadyOpened) uinput_close();
   if (!(uinput_fd = open(uinputFile.toAscii().constData(), O_WRONLY | O_NDELAY))) {
diff -Naur src/devices/general.cpp src2/devices/general.cpp
--- src/devices/general.cpp	2010-11-22 04:31:15.000000000 +0100
+++ src2/devices/general.cpp	2012-05-20 04:24:20.994390228 +0200
@@ -18,7 +18,7 @@
  **********************************************************************************/
 
 #include "devices/general.h"
-
+#include <unistd.h>
 #include <QStringList>
 #include <QFile>
 
diff -Naur src/devices/mouse.cpp src2/devices/mouse.cpp
--- src/devices/mouse.cpp	2010-11-22 04:31:15.000000000 +0100
+++ src2/devices/mouse.cpp	2012-05-20 04:24:20.994390228 +0200
@@ -18,7 +18,7 @@
  **********************************************************************************/
 
 #include "devices/mouse.h"
-
+#include <unistd.h>
 bool UInputMouse::uinput_open(QRect absRect, bool abs){
   if (alreadyOpened) uinput_close();
   if (!(uinput_fd = open(uinputFile.toAscii().constData(), O_WRONLY | O_NDELAY))) {
diff -Naur src/devices/wiimotegamepad.cpp src2/devices/wiimotegamepad.cpp
--- src/devices/wiimotegamepad.cpp	2010-11-22 04:31:15.000000000 +0100
+++ src2/devices/wiimotegamepad.cpp	2012-05-20 04:24:20.994390228 +0200
@@ -18,7 +18,7 @@
  **********************************************************************************/
 
 #include "devices/wiimotegamepad.h"
-
+#include <unistd.h>
 WiimoteGamepadDevice::WiimoteGamepadDevice(QString deviceName) :
   UInputObject(),
   deviceName(deviceName)
--- src/config.h.in	2010-11-22 04:31:15.000000000 +0100
+++ src2/config.h.in	2012-05-20 04:24:20.981056947 +0200
@@ -21,7 +21,7 @@
 #define CONFIG_H_IN
 
 #define CMAKE_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}"
-
+#include <unistd.h>
 #cmakedefine USE_SYSTEM_CWIID
 
 #define WIIMOTEDEV_VERSION_MAJOR ${WIIMOTEDEV_VERSION_MAJOR}