From 8b06b65f35445a1dc8490ede523a23fab46529fa Mon Sep 17 00:00:00 2001 From: Mike Morris Date: Mon, 6 Oct 2014 16:53:57 -0400 Subject: wrap GL/glx.h with undef None, use 0 instead, h/t @jfirebaugh --- common/glx.h | 2 ++ common/headless_display.cpp | 2 +- common/headless_view.cpp | 2 +- common/headless_view.hpp | 2 +- 4 files changed, 5 insertions(+), 3 deletions(-) create mode 100644 common/glx.h (limited to 'common') diff --git a/common/glx.h b/common/glx.h new file mode 100644 index 0000000000..6b7d9a3df9 --- /dev/null +++ b/common/glx.h @@ -0,0 +1,2 @@ +#include +#undef None diff --git a/common/headless_display.cpp b/common/headless_display.cpp index 38d123034b..b183b0a501 100644 --- a/common/headless_display.cpp +++ b/common/headless_display.cpp @@ -39,7 +39,7 @@ HeadlessDisplay::HeadlessDisplay() { GLX_ALPHA_SIZE, 8, GLX_DEPTH_SIZE, 24, GLX_STENCIL_SIZE, 8, - None + 0 }; x_info = glXChooseVisual(x_display, DefaultScreen(x_display), pixelFormat); diff --git a/common/headless_view.cpp b/common/headless_view.cpp index 86fa445fc8..cd8ee685d5 100644 --- a/common/headless_view.cpp +++ b/common/headless_view.cpp @@ -171,7 +171,7 @@ void HeadlessView::make_inactive() { #endif #if MBGL_USE_GLX - if (!glXMakeCurrent(x_display, None, NULL)) { + if (!glXMakeCurrent(x_display, 0, NULL)) { fprintf(stderr, "Removing OpenGL context failed\n"); } #endif diff --git a/common/headless_view.hpp b/common/headless_view.hpp index 381988ae94..cef4213e90 100644 --- a/common/headless_view.hpp +++ b/common/headless_view.hpp @@ -4,7 +4,7 @@ #ifdef __APPLE__ #define MBGL_USE_CGL 1 #else -#include +#include "glx.h" #define MBGL_USE_GLX 1 #endif -- cgit v1.2.1