[PATCH] gcc 4.2 doesn't accept 2 typedef declarations of the same type.
Matthieu Herrb
matthieu at herrb.eu
Sat Jul 12 11:01:41 PDT 2014
Protect them with a macro to avoid the duplication.
Signed-off-by: Matthieu Herrb <matthieu at herrb.eu>
---
hw/xfree86/common/xf86.h | 3 +++
hw/xfree86/common/xf86Xinput.h | 7 ++++++-
2 files changed, 9 insertions(+), 1 deletion(-)
diff --git a/hw/xfree86/common/xf86.h b/hw/xfree86/common/xf86.h
index cec3135..17e5bc4 100644
--- a/hw/xfree86/common/xf86.h
+++ b/hw/xfree86/common/xf86.h
@@ -215,7 +215,10 @@ extern _X_EXPORT xf86SetDGAModeProc xf86SetDGAMode;
/* xf86Events.c */
+#ifndef XF86_INPUT_INFO_PTR_DECLARED
typedef struct _InputInfoRec *InputInfoPtr;
+#define XF86_INPUT_INFO_PTR_DECLARED
+#endif
extern _X_EXPORT void SetTimeSinceLastInputEvent(void);
extern _X_EXPORT void *xf86AddInputHandler(int fd, InputHandlerProc proc,
diff --git a/hw/xfree86/common/xf86Xinput.h b/hw/xfree86/common/xf86Xinput.h
index 9fe8c87..d9615ba 100644
--- a/hw/xfree86/common/xf86Xinput.h
+++ b/hw/xfree86/common/xf86Xinput.h
@@ -85,7 +85,12 @@ typedef struct _InputDriverRec {
/* This is to input devices what the ScrnInfoRec is to screens. */
-typedef struct _InputInfoRec {
+#ifndef XF86_INPUT_INFO_PTR_DECLARED
+typedef struct _InputInfoRec *InputInfoPtr;
+#define XF86_INPUT_INFO_PTR_DECLARED
+#endif
+
+struct _InputInfoRec {
struct _InputInfoRec *next;
char *name;
char *driver;
--
1.9.3
More information about the xorg-devel
mailing list