Package: read-edid
Version: 1.4.1-2.1
Severity: important
Tags: patch
User: [EMAIL PROTECTED]
Usertags: origin-ubuntu ubuntu-patch intrepid

read-edid fails to build on current kernels, since the *_MASK
definitions have been removed. Also, ioperm and iopl have no prototypes
due to a missing #include, although that isn't fatal.

See also bug #488101 against libx86. If you fix bug #495131, then the
lrmi.c part of this patch will become unnecessary, but the get-edid.c
part would still be worth applying.

(I haven't checked whether the new upstream release suffers from these
problems.)

  * get-edid.c: Include <sys/io.h> for ioperm and iopl.
  * lrmi.c: Linux 2.6.26-rc1 and newer no longer define *_MASK; use
    X86_EFLAGS_* instead.

--- read-edid-1.4.1.orig/lrmi.c
+++ read-edid-1.4.1/lrmi.c
@@ -18,6 +18,21 @@
 #include <sys/vm86.h>
 #endif
 
+#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>
--- read-edid-1.4.1.orig/get-edid.c
+++ read-edid-1.4.1/get-edid.c
@@ -5,6 +5,7 @@
 #include <assert.h>
 #include <string.h>
 #include <sys/types.h>
+#include <sys/io.h>
 
 #include "lrmi.h"
 

Thanks,

-- 
Colin Watson                                       [EMAIL PROTECTED]



-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to