diff -Nur debian.old/patches/fix-kfreebsd-ftbs.patch debian/patches/fix-kfreebsd-ftbs.patch --- debian.old/patches/fix-kfreebsd-ftbs.patch 1970-01-01 00:00:00.000000000 +0000 +++ debian/patches/fix-kfreebsd-ftbs.patch 2015-12-17 17:13:04.000000000 +0000 @@ -0,0 +1,55 @@ +fix FTBS on non-linux architectures, like Debian GNU/ kFreeBSD or hurd-i386 + +* __s16 is not defined on kFreeBSD +* __u16 is not defined on kFreeBSD +* __u32 is not defined on kFreeBSD +* __u64 is not defined on kFreeBSD + +Signed-off-by: Stefan Lippers-Hollmann +--- + daemons/lircmd.c | 4 ++-- + drivers/lirc.h | 6 ++++++ + 2 files changed, 8 insertions(+), 2 deletions(-) + +Index: lirc-0.9.0/daemons/lircmd.c +=================================================================== +--- lirc-0.9.0.orig/daemons/lircmd.c ++++ lirc-0.9.0/daemons/lircmd.c +@@ -277,9 +277,9 @@ setup_error: + return -1; + } + ++#ifdef __linux__ + void write_uinput(__u16 type, __u16 code, __s32 value) + { +-#ifdef __linux__ + struct input_event event; + + memset(&event, 0, sizeof(event)); +@@ -299,8 +299,8 @@ void write_uinput(__u16 type, __u16 code + syslog(LOG_ERR, "%m"); + } + } +-#endif + } ++#endif + + void msend(int dx, int dy, int dz, int rep, int buttp, int buttr) + { +Index: lirc-0.9.0/drivers/lirc.h +=================================================================== +--- lirc-0.9.0.orig/drivers/lirc.h ++++ lirc-0.9.0/drivers/lirc.h +@@ -19,6 +19,12 @@ + #include + #endif + ++#ifndef __linux__ ++#include ++#define __u32 uint32_t ++#define __u64 uint64_t ++#endif ++ + #define PULSE_BIT 0x01000000 + #define PULSE_MASK 0x00FFFFFF + diff -Nur debian.old/patches/lirc_fix-build-on-non-Linux-architectures.patch debian/patches/lirc_fix-build-on-non-Linux-architectures.patch --- debian.old/patches/lirc_fix-build-on-non-Linux-architectures.patch 1970-01-01 00:00:00.000000000 +0000 +++ debian/patches/lirc_fix-build-on-non-Linux-architectures.patch 2015-12-17 17:12:35.000000000 +0000 @@ -0,0 +1,37 @@ +From: Aurelien Jarno + +make lirc buildable on non-Linux architectures using (E)GLIBC + +http://bugs.debian.org/540742 + +Signed-off-by: Stefan Lippers-Hollmann +--- + drivers/lirc.h | 3 +++ + tools/irpty.c | 4 ++++ + 2 files changed, 7 insertions(+)# + +--- a/drivers/lirc.h ++++ b/drivers/lirc.h +@@ -11,6 +11,9 @@ + #include + #elif defined(_NetBSD_) + #include ++#elif defined (__GLIBC__) ++#include ++#include + #elif defined(_CYGWIN_) + #define __USE_LINUX_IOCTL_DEFS + #include +--- a/tools/irpty.c ++++ b/tools/irpty.c +@@ -144,6 +144,10 @@ static void copy_loop(int ptym, int igno + return; + } + ++#undef RESET ++#undef RAW ++#undef CBREAK ++ + static struct termios save_termios; + static int ttysavefd = -1; + static enum { diff -Nur debian.old/patches/series debian/patches/series --- debian.old/patches/series 2014-03-16 05:37:49.000000000 +0000 +++ debian/patches/series 2015-12-17 17:12:35.000000000 +0000 @@ -1 +1,3 @@ 02_Makefile.in +lirc_fix-build-on-non-Linux-architectures.patch +fix-kfreebsd-ftbs.patch