diff -ru lirc-0.8.0-orig/drivers/kcompat.h lirc-0.8.0/drivers/kcompat.h --- lirc-0.8.0-orig/drivers/kcompat.h 2006-07-16 21:09:26.323828798 +0200 +++ lirc-0.8.0/drivers/kcompat.h 2006-07-16 21:09:45.441698751 +0200 @@ -15,8 +15,11 @@ #include +#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,18) #define LIRC_HAVE_DEVFS #define LIRC_HAVE_DEVFS_26 +#endif + #define LIRC_HAVE_SYSFS #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,13) diff -ru lirc-0.8.0-orig/drivers/lirc_dev/lirc_dev.c lirc-0.8.0/drivers/lirc_dev/lirc_dev.c --- lirc-0.8.0-orig/drivers/lirc_dev/lirc_dev.c 2006-07-16 21:09:26.327829190 +0200 +++ lirc-0.8.0/drivers/lirc_dev/lirc_dev.c 2006-07-16 21:09:45.441698751 +0200 @@ -49,16 +49,18 @@ #endif #define __KERNEL_SYSCALLS__ #include + +#include "drivers/kcompat.h" + /* DevFS header */ -#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,4,0) +#if defined(LIRC_HAVE_DEVFS) #include #endif /* SysFS header */ -#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0) +#if defined(LIRC_HAVE_SYSFS) #include #endif -#include "drivers/kcompat.h" #include "drivers/lirc.h" #include "lirc_dev.h" diff -ru lirc-0.8.0-orig/drivers/lirc_imon/lirc_imon.c lirc-0.8.0/drivers/lirc_imon/lirc_imon.c --- lirc-0.8.0-orig/drivers/lirc_imon/lirc_imon.c 2006-07-16 21:09:26.327829190 +0200 +++ lirc-0.8.0/drivers/lirc_imon/lirc_imon.c 2006-07-16 21:11:14.542390676 +0200 @@ -58,10 +58,13 @@ #include #include #include +#include "drivers/kcompat.h" + +#if defined(LIRC_HAVE_DEVFS) #include +#endif #include "drivers/lirc.h" -#include "drivers/kcompat.h" #include "drivers/lirc_dev/lirc_dev.h" diff -ru lirc-0.8.0-orig/drivers/lirc_sasem/lirc_sasem.c lirc-0.8.0/drivers/lirc_sasem/lirc_sasem.c --- lirc-0.8.0-orig/drivers/lirc_sasem/lirc_sasem.c 2006-07-16 21:09:26.323828798 +0200 +++ lirc-0.8.0/drivers/lirc_sasem/lirc_sasem.c 2006-07-16 21:12:21.700919590 +0200 @@ -67,10 +67,13 @@ #include #include #include + +#include "drivers/kcompat.h" +#if defined(LIRC_HAVE_DEVFS) #include +#endif #include "drivers/lirc.h" -#include "drivers/kcompat.h" #include "drivers/lirc_dev/lirc_dev.h"