From 687049f3948b8b17a9bc2f0ef566206b8056ee35 Mon Sep 17 00:00:00 2001 From: "Enrico Weigelt, metux IT consult" Date: Mon, 19 May 2025 18:48:48 +0200 Subject: [PATCH] ephyr: workaround for name clash between Xlib and Xserver A slight change in include order can cause Xlib to be included and defining "GC" type, which is conflicting with Xserver's own type by same name. As long as MR !1393 hasn't merged yet, we need to do an ugly workaround using some preprocessor black magic. Signed-off-by: Enrico Weigelt, metux IT consult --- hw/kdrive/ephyr/hostx.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/hw/kdrive/ephyr/hostx.c b/hw/kdrive/ephyr/hostx.c index 33dcccf8f..ff3565a72 100644 --- a/hw/kdrive/ephyr/hostx.c +++ b/hw/kdrive/ephyr/hostx.c @@ -37,6 +37,14 @@ #include #include +// workaround for name clash between Xlib and Xserver: +// GL might pull in Xlib.h (why ?), which is definining a type "GC", that's +// conflicting with Xserver's "GC" type. +#define GC XlibGC +#include +#include +#undef GC + #include "dix/input_priv.h" #include "hostx.h"