aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDanilo Spinella <danyspin97@protonmail.com>2019-10-16 15:16:53 +0200
committerSimon Ser <contact@emersion.fr>2019-10-16 16:29:25 +0300
commit41cbb80e25a93948459ac7785833e8e64b2f8e28 (patch)
tree312bc9e326ced3a010e5dd3de1ce9269577abd66
parent21b75e5d1207e25ad8848e0b077c2754a5e9dc0b (diff)
Add new define EGL_NO_X11 for newer mesa library
Define both MESA_EGL_NO_X11_HEADERS and EGL_NO_X11 for backward combatibility.
-rwxr-xr-xglgen.sh7
-rw-r--r--include/wlr/render/egl.h7
-rw-r--r--include/wlr/render/interface.h7
3 files changed, 18 insertions, 3 deletions
diff --git a/glgen.sh b/glgen.sh
index daa98b00..7324fdf6 100755
--- a/glgen.sh
+++ b/glgen.sh
@@ -64,9 +64,14 @@ cat > "$OUTDIR/$BASE.h" << EOF
#include <stdbool.h>
#include <wlr/config.h>
-#if !WLR_HAS_X11_BACKEND && !WLR_HAS_XWAYLAND && !defined MESA_EGL_NO_X11_HEADERS
+#if !WLR_HAS_X11_BACKEND && !WLR_HAS_XWAYLAND
+#ifndef MESA_EGL_NO_X11_HEADERS
#define MESA_EGL_NO_X11_HEADERS
#endif
+#ifndef EGL_NO_X11
+#define EGL_NO_X11
+#endif
+#endif
#include <EGL/egl.h>
#include <EGL/eglext.h>
diff --git a/include/wlr/render/egl.h b/include/wlr/render/egl.h
index 915de5c0..efded0b6 100644
--- a/include/wlr/render/egl.h
+++ b/include/wlr/render/egl.h
@@ -11,9 +11,14 @@
#include <wlr/config.h>
-#if !WLR_HAS_X11_BACKEND && !WLR_HAS_XWAYLAND && !defined MESA_EGL_NO_X11_HEADERS
+#if !WLR_HAS_X11_BACKEND && !WLR_HAS_XWAYLAND
+#ifndef MESA_EGL_NO_X11_HEADERS
#define MESA_EGL_NO_X11_HEADERS
#endif
+#ifndef EGL_NO_X11
+#define EGL_NO_X11
+#endif
+#endif
#include <EGL/egl.h>
#include <EGL/eglext.h>
diff --git a/include/wlr/render/interface.h b/include/wlr/render/interface.h
index 088b1efa..21c1e044 100644
--- a/include/wlr/render/interface.h
+++ b/include/wlr/render/interface.h
@@ -11,9 +11,14 @@
#include <wlr/config.h>
-#if !WLR_HAS_X11_BACKEND && !WLR_HAS_XWAYLAND && !defined MESA_EGL_NO_X11_HEADERS
+#if !WLR_HAS_X11_BACKEND && !WLR_HAS_XWAYLAND
+#ifndef MESA_EGL_NO_X11_HEADERS
#define MESA_EGL_NO_X11_HEADERS
#endif
+#ifndef EGL_NO_X11
+#define EGL_NO_X11
+#endif
+#endif
#include <EGL/egl.h>
#include <EGL/eglext.h>