Index: trunk/src/samhain_erase.c
===================================================================
--- trunk/src/samhain_erase.c	(revision 440)
+++ trunk/src/samhain_erase.c	(revision 443)
@@ -71,8 +71,17 @@
 /* The configure options (#defines) for the Kernel
  */
+#define KERNEL_VERSION(a,b,c) (((a) << 16) + ((b) << 8) + (c))
+
+#if SH_KERNEL_NUMERIC >= KERNEL_VERSION(2,6,33)
+#include <generated/autoconf.h>
+#else
+#if SH_KERNEL_NUMERIC >= KERNEL_VERSION(2,6,19)
+#include <linux/autoconf.h>
+#else
 #include <linux/config.h>
-
 #ifdef CONFIG_MODVERSIONS
 #include <linux/modversions.h>
+#endif
+#endif
 #endif
 
Index: trunk/src/samhain_hide.c
===================================================================
--- trunk/src/samhain_hide.c	(revision 440)
+++ trunk/src/samhain_hide.c	(revision 443)
@@ -101,6 +101,10 @@
 
 #ifndef LINUX26
+#ifndef __KERNEL__
 #define __KERNEL__
+#endif
+#ifndef MODULE
 #define MODULE
+#endif
 #endif
 #define LINUX
@@ -137,10 +141,13 @@
 #endif
 
-#ifndef LINUX26
+#if SH_KERNEL_NUMERIC < KERNEL_VERSION(2,6,0)
 #ifdef CONFIG_MODVERSIONS
 #include <linux/modversions.h>
 #endif
-#endif
-
+#else
+#ifndef LINUX26
+#define LINUX26
+#endif
+#endif
 
 #ifdef LINUX26
@@ -179,5 +186,10 @@
 /* Include for lock_kernel().
  */
+#if SH_KERNEL_NUMERIC < KERNEL_VERSION(3,0,0)
 #include <linux/smp_lock.h>
+#else
+static inline void lock_kernel(void) { }
+static inline void unlock_kernel(void) { }
+#endif
 
 #if SH_KERNEL_NUMERIC >= SH_KERNEL_MIN
