Index: trunk/configure.ac
===================================================================
--- trunk/configure.ac	(revision 347)
+++ trunk/configure.ac	(revision 348)
@@ -12,5 +12,5 @@
 dnl start
 dnl
-AM_INIT_AUTOMAKE(samhain, 2.8.4a)
+AM_INIT_AUTOMAKE(samhain, 2.8.5)
 AC_DEFINE([SAMHAIN], 1, [Application is samhain])
 AC_CANONICAL_HOST
@@ -2130,7 +2130,17 @@
 			sh_libkvm="-lkvm"
 		elif test -f "${systemmap}"; then
-		     	if test -c /dev/kmem; then 
-			   :
-			else
+
+		        test_kmap_open=no
+
+		     	if test -c /dev/kmem; then
+			   AC_MSG_CHECKING([whether /dev/kmem is useable])
+			   dd bs=4 if=/dev/kmem of=/dev/null 2>&1 | grep opening >/dev/null
+			   if test $? -ne 0; then
+			      test_kmap_open=yes
+			   fi
+			   AC_MSG_RESULT([${test_kmap_open}])
+			fi
+
+			if test x"${test_kmap_open}" = xno; then
 			   # need kernel module
 
Index: trunk/src/sh_kern.c
===================================================================
--- trunk/src/sh_kern.c	(revision 347)
+++ trunk/src/sh_kern.c	(revision 348)
@@ -1099,5 +1099,5 @@
 {
   struct proc_dir_entry     proc_root_dir;
-  struct inode_operations * proc_root_inode_op = NULL;
+  int                       proc_root_inode_op_flag = 0;
 
 /* 2.6.21 (((2) << 16) + ((6) << 8) + (21)) */
@@ -1120,16 +1120,16 @@
   if (((unsigned long) * &proc_root_dir.proc_iops) == proc_root_iops)
     {
-      proc_root_inode_op = (struct inode_operations *) &(proc_root_dir.proc_iops);
+      proc_root_inode_op_flag = 1;
     }
   else if (proc_root_dir.size == proc_root_iops)
     {
-      proc_root_inode_op = (struct inode_operations *) &(proc_root_dir.size);
+      proc_root_inode_op_flag = 1;
     }
   else if ((unsigned long) * &proc_root_dir.proc_fops == proc_root_iops)
     {
-      proc_root_inode_op = (struct inode_operations *) &(proc_root_dir.proc_fops);
-    }
-
-  if (!proc_root_inode_op)
+      proc_root_inode_op_flag = 1;
+    }
+
+  if (0 == proc_root_inode_op_flag)
     {
       sh_error_handle ((-1), FIL__, __LINE__, 0, MSG_KERN_PROC,
