shared: work around EGL header idiosyncrasy
authorAhmet Acar <unixman@archlinux.info>
Fri, 13 Nov 2015 16:25:46 +0000 (10:25 -0600)
committerDerek Foreman <derekf@osg.samsung.com>
Fri, 13 Nov 2015 16:25:46 +0000 (10:25 -0600)
When no X11 headers are present eglplatform.h will break unless
certain defines are set prior to its inclusion.

including wayland-egl.h defines WL_EGL_PLATFORM which will stop
the attempted inclusion of the X11 headers.

Maybe this isn't the best solution to the problem, but it's harmless
and gets the job done.

Closes bug: https://bugs.freedesktop.org/show_bug.cgi?id=92104

Reviewed-by: Derek Foreman <derekf@osg.samsung.com>
(patch by Ahmet Acar, commit log by Derek Foreman)

shared/platform.h

index 64e1fbf..cf4ecc0 100644 (file)
@@ -29,6 +29,7 @@
 #include <string.h>
 
 #ifdef ENABLE_EGL
+#include <wayland-egl.h>
 #include <EGL/egl.h>
 #include <EGL/eglext.h>
 #endif