--- lrmi.c.old	2009-01-29 13:32:57.000000000 +0100
+++ lrmi.c	2009-01-29 14:40:03.000000000 +0100
@@ -18,6 +18,23 @@
 #include <sys/vm86.h>
 #endif
 
+/* To make it compatibile with kernels >=2.6.26-rc1 
+ * Thanks to Collin Watson: cjwatson@ubuntu.org */
+#if defined(__linux__)
+#ifndef TF_MASK
+#define TF_MASK X86_EFLAGS_TF
+#endif
+#ifndef IF_MASK
+#define IF_MASK X86_EFLAGS_IF
+#endif
+#ifndef IOPL_MASK
+#define IOPL_MASK X86_EFLAGS_IOPL
+#endif
+#ifndef VIF_MASK
+#define VIF_MASK X86_EFLAGS_VIF
+#endif
+#endif
+
 #include <sys/types.h>
 #include <sys/stat.h>
 #include <sys/mman.h>
--- get-edid.c.old	2009-01-29 13:32:49.000000000 +0100
+++ get-edid.c	2009-01-29 13:38:29.000000000 +0100
@@ -5,6 +5,7 @@
 #include <assert.h>
 #include <string.h>
 #include <sys/types.h>
+#include <sys/io.h>
 
 #include "lrmi.h"
 
