Fix lcd4linux compilation with 2.4 kernels
git-svn-id: svn://svn.openwrt.org/openwrt/packages@12215 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
parent
007bd41d7f
commit
232f85cda4
25
utils/lcd4linux/patches/160-uinput_defs.patch
Normal file
25
utils/lcd4linux/patches/160-uinput_defs.patch
Normal file
@ -0,0 +1,25 @@
|
||||
diff -urN lcd4linux-r877/drv_G15.c lcd4linux-r877.new/drv_G15.c
|
||||
--- lcd4linux-r877/drv_G15.c 2008-06-01 22:47:45.000000000 +0200
|
||||
+++ lcd4linux-r877.new/drv_G15.c 2008-08-06 17:31:04.000000000 +0200
|
||||
@@ -42,6 +42,7 @@
|
||||
|
||||
#include <usb.h>
|
||||
#include <fcntl.h>
|
||||
+#include <linux/version.h>
|
||||
#include <linux/input.h>
|
||||
#include <linux/uinput.h>
|
||||
|
||||
@@ -258,8 +259,13 @@
|
||||
}
|
||||
memset(&device, 0, sizeof(device));
|
||||
strncpy(device.name, "G15 Keys", UINPUT_MAX_NAME_SIZE);
|
||||
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0)
|
||||
device.id.bustype = BUS_USB;
|
||||
device.id.version = 4;
|
||||
+#else
|
||||
+ device.idbus = BUS_USB;
|
||||
+ device.idversion = 4;
|
||||
+#endif
|
||||
|
||||
ioctl(uinput_fd, UI_SET_EVBIT, EV_KEY);
|
||||
|
Loading…
x
Reference in New Issue
Block a user