From 0752648a993c6f0fae2f4a072079000b9d84d074 Mon Sep 17 00:00:00 2001 From: Erik Faye-Lund Date: Wed, 15 Apr 2020 22:48:46 +0200 Subject: [PATCH] vbo: avoid including wingdi.h on win32 On Windows, main/glheader.h ends up including windows.h which in turn includes wingdi.h unless the NOGDI macro is defined. And wingdi.h defines a macro called "ERROR", which we end up redefining below. To avoid a warning on the redefinition, we can define NOGDI to prevent wingdi.h from implicitly being included. Reviewed-by: Brian Paul Part-of: --- src/mesa/vbo/vbo_noop.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/mesa/vbo/vbo_noop.c b/src/mesa/vbo/vbo_noop.c index ab85904a442..e74b6500f5b 100644 --- a/src/mesa/vbo/vbo_noop.c +++ b/src/mesa/vbo/vbo_noop.c @@ -28,6 +28,9 @@ * GLvertexformat no-op functions. Used in out-of-memory situations. */ +#ifdef _WIN32 +#define NOGDI +#endif #include "main/glheader.h" #include "main/context.h" -- 2.30.2