Hi all,

Arjan sent a patch a month ago about this build bug. Basically,
bios_reader.c redefines CARD* which is defined in some versions of
hw/xfree86/ddc/edid.h, but was removed when vdif.h was dropped last year.

Here's my attempt to fix it, hopefully in a better way (ie, new drivers
should build with older servers).

Thanks

-- 
Rémi Cardona
LRI, INRIA
[EMAIL PROTECTED]
[EMAIL PROTECTED]
>From 6e8bf145b6b7449f81799581fdf5e5583a6d12ce Mon Sep 17 00:00:00 2001
From: =?utf-8?q?R=C3=A9mi=20Cardona?= <[EMAIL PROTECTED]>
Date: Mon, 24 Nov 2008 13:26:27 +0100
Subject: [PATCH] xfree86: include <X11/Xmd.h> in edid.h to define CARD16

Xmd used to be included by the now defunct vdif.h, this should fix hacks
in DDX video drivers (especially -intel)
---
 hw/xfree86/ddc/edid.h |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/hw/xfree86/ddc/edid.h b/hw/xfree86/ddc/edid.h
index a4e79da..041bbfd 100644
--- a/hw/xfree86/ddc/edid.h
+++ b/hw/xfree86/ddc/edid.h
@@ -12,6 +12,8 @@
 #ifndef _EDID_H_
 #define _EDID_H_ 
 
+#include <X11/Xmd.h>
+
 /* read complete EDID record */
 #define EDID1_LEN 128
 #define BITS_PER_BYTE 9
-- 
1.6.0.4

>From cd63414bc0efa0b9f1691e28be9ddfca9fef0486 Mon Sep 17 00:00:00 2001
From: =?utf-8?q?R=C3=A9mi=20Cardona?= <[EMAIL PROTECTED]>
Date: Mon, 24 Nov 2008 13:31:20 +0100
Subject: [PATCH] include <X11/Xmd.h> to define CARD16 needed by edid.h

---
 src/bios_reader/bios_reader.c |    8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/src/bios_reader/bios_reader.c b/src/bios_reader/bios_reader.c
index 2a6906d..1e41778 100644
--- a/src/bios_reader/bios_reader.c
+++ b/src/bios_reader/bios_reader.c
@@ -38,9 +38,11 @@
 
 #include "../i830_bios.h"
 
-typedef uint8_t CARD8;
-typedef uint16_t CARD16;
-typedef uint32_t CARD32;
+/* backwards compatibility with edid.h from xorg-server 1.5 and older */
+#ifndef CARD16
+#include <X11/Xmd.h>
+#endif
+
 #define _PARSE_EDID_
 #include "edid.h"
 
-- 
1.6.0.4

_______________________________________________
xorg mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/xorg

Reply via email to