Make lirc compile w/ 2.6.27 kernels
authorFlorian Fainelli <florian@openwrt.org>
Mon, 12 Jan 2009 23:26:24 +0000 (23:26 +0000)
committerFlorian Fainelli <florian@openwrt.org>
Mon, 12 Jan 2009 23:26:24 +0000 (23:26 +0000)
SVN-Revision: 14001

utils/lirc/patches/110-semaphore_include.patch [new file with mode: 0644]

diff --git a/utils/lirc/patches/110-semaphore_include.patch b/utils/lirc/patches/110-semaphore_include.patch
new file mode 100644 (file)
index 0000000..ae322bb
--- /dev/null
@@ -0,0 +1,15 @@
+diff -urN lirc-0.8.3/drivers/lirc_dev/lirc_dev.c lirc-0.8.3.new/drivers/lirc_dev/lirc_dev.c
+--- lirc-0.8.3/drivers/lirc_dev/lirc_dev.c     2008-01-13 11:45:02.000000000 +0100
++++ lirc-0.8.3.new/drivers/lirc_dev/lirc_dev.c 2009-01-13 00:23:56.000000000 +0100
+@@ -49,7 +49,11 @@
+ #include <linux/uaccess.h>
+ #include <linux/errno.h>
+ #endif
++#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,27)
+ #include <asm/semaphore.h>
++#else
++#include <linux/semaphore.h>
++#endif
+ #if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 0)
+ #include <linux/wrapper.h>
+ #endif