From 1ca48d0a48dbec38d2765d8626f7983751226966 Mon Sep 17 00:00:00 2001 From: "Enrico Weigelt, metux IT consult" Date: Mon, 11 Mar 2024 10:08:13 +0100 Subject: [PATCH] dix: workaround for win32 name clash on CreateWindow() The problem is, ming32 headers unconditionally define CreateWindow() to alias CreateWindowA() in winuser.h, which is included by windows.h, which is included by *a lot* common headers. So it highly depends on the exact include order, whether it works. (also weird things could happen, e.g. the Xserver's CreateWindow() ending up renamed to CreateWindowA(), ...) Until we've found a really clean solution to this problem (which might involve fixing mingw32 first), just add a little workaround by undef'ing CreateWindow symbol whereever necessary. Signed-off-by: Enrico Weigelt, metux IT consult Part-of: --- dix/dispatch.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/dix/dispatch.c b/dix/dispatch.c index 04a50259d..aeb9d0717 100644 --- a/dix/dispatch.c +++ b/dix/dispatch.c @@ -132,6 +132,9 @@ Equipment Corporation. #include "client.h" #include "xfixesint.h" +// temporary workaround for win32/mingw32 name clash +#undef CreateWindow + #ifdef XSERVER_DTRACE #include "probes.h" #endif