From: Erik Faye-Lund Date: Wed, 15 Apr 2020 20:48:46 +0000 (+0200) Subject: vbo: avoid including wingdi.h on win32 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=0752648a993c6f0fae2f4a072079000b9d84d074;p=mesa.git 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: --- 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"