aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorErik Faye-Lund <[email protected]>2020-04-15 22:48:46 +0200
committerMarge Bot <[email protected]>2020-04-16 14:48:40 +0000
commit0752648a993c6f0fae2f4a072079000b9d84d074 (patch)
treea8553b2be683d97d59353e1b7dcdf2cdbe078a4d
parentb55b033f7624171d82ae1f79f3d3ad058ae0ac56 (diff)
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 <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4577>
-rw-r--r--src/mesa/vbo/vbo_noop.c3
1 files changed, 3 insertions, 0 deletions
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"