summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/GL/mesa_glinterop.h4
-rw-r--r--src/egl/drivers/dri2/egl_dri2.c2
-rw-r--r--src/egl/main/eglapi.c2
3 files changed, 6 insertions, 2 deletions
diff --git a/include/GL/mesa_glinterop.h b/include/GL/mesa_glinterop.h
index 173476a988..45fda93ca2 100644
--- a/include/GL/mesa_glinterop.h
+++ b/include/GL/mesa_glinterop.h
@@ -58,12 +58,16 @@ extern "C" {
#endif
/* Forward declarations to avoid inclusion of GL/glx.h */
+#ifndef GLX_H
struct _XDisplay;
struct __GLXcontextRec;
+#endif
/* Forward declarations to avoid inclusion of EGL/egl.h */
+#ifndef __egl_h_
typedef void *EGLDisplay;
typedef void *EGLContext;
+#endif
/** Returned error codes. */
enum {
diff --git a/src/egl/drivers/dri2/egl_dri2.c b/src/egl/drivers/dri2/egl_dri2.c
index ed79e0d0a3..125943333b 100644
--- a/src/egl/drivers/dri2/egl_dri2.c
+++ b/src/egl/drivers/dri2/egl_dri2.c
@@ -46,7 +46,6 @@
#endif
#include <GL/gl.h>
#include <GL/internal/dri_interface.h>
-#include "GL/mesa_glinterop.h"
#include <sys/types.h>
#include <sys/stat.h>
@@ -61,6 +60,7 @@
#endif
#include "egl_dri2.h"
+#include "GL/mesa_glinterop.h"
#include "loader/loader.h"
#include "util/u_atomic.h"
#include "util/u_vector.h"
diff --git a/src/egl/main/eglapi.c b/src/egl/main/eglapi.c
index c935c4db79..e3f10fcbe2 100644
--- a/src/egl/main/eglapi.c
+++ b/src/egl/main/eglapi.c
@@ -88,7 +88,6 @@
#include <string.h>
#include "c99_compat.h"
#include "c11/threads.h"
-#include "GL/mesa_glinterop.h"
#include "util/macros.h"
#include "eglglobals.h"
@@ -102,6 +101,7 @@
#include "eglimage.h"
#include "eglsync.h"
+#include "GL/mesa_glinterop.h"
/**
* Macros to help return an API entrypoint.