egl: Fix inclusion of egl.h+mesa_glinterop.h
Previously clang would warn about redefinition of typedef EGLDisplay. Avoid this by adding preprocessor guards to mesa_glinterop.h and including it after EGL.h is indirectly included. Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
This commit is contained in:
@@ -58,12 +58,16 @@ extern "C" {
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Forward declarations to avoid inclusion of GL/glx.h */
|
/* Forward declarations to avoid inclusion of GL/glx.h */
|
||||||
|
#ifndef GLX_H
|
||||||
struct _XDisplay;
|
struct _XDisplay;
|
||||||
struct __GLXcontextRec;
|
struct __GLXcontextRec;
|
||||||
|
#endif
|
||||||
|
|
||||||
/* Forward declarations to avoid inclusion of EGL/egl.h */
|
/* Forward declarations to avoid inclusion of EGL/egl.h */
|
||||||
|
#ifndef __egl_h_
|
||||||
typedef void *EGLDisplay;
|
typedef void *EGLDisplay;
|
||||||
typedef void *EGLContext;
|
typedef void *EGLContext;
|
||||||
|
#endif
|
||||||
|
|
||||||
/** Returned error codes. */
|
/** Returned error codes. */
|
||||||
enum {
|
enum {
|
||||||
|
@@ -46,7 +46,6 @@
|
|||||||
#endif
|
#endif
|
||||||
#include <GL/gl.h>
|
#include <GL/gl.h>
|
||||||
#include <GL/internal/dri_interface.h>
|
#include <GL/internal/dri_interface.h>
|
||||||
#include "GL/mesa_glinterop.h"
|
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#include <sys/stat.h>
|
#include <sys/stat.h>
|
||||||
|
|
||||||
@@ -61,6 +60,7 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "egl_dri2.h"
|
#include "egl_dri2.h"
|
||||||
|
#include "GL/mesa_glinterop.h"
|
||||||
#include "loader/loader.h"
|
#include "loader/loader.h"
|
||||||
#include "util/u_atomic.h"
|
#include "util/u_atomic.h"
|
||||||
#include "util/u_vector.h"
|
#include "util/u_vector.h"
|
||||||
|
@@ -88,7 +88,6 @@
|
|||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include "c99_compat.h"
|
#include "c99_compat.h"
|
||||||
#include "c11/threads.h"
|
#include "c11/threads.h"
|
||||||
#include "GL/mesa_glinterop.h"
|
|
||||||
#include "util/macros.h"
|
#include "util/macros.h"
|
||||||
|
|
||||||
#include "eglglobals.h"
|
#include "eglglobals.h"
|
||||||
@@ -102,6 +101,7 @@
|
|||||||
#include "eglimage.h"
|
#include "eglimage.h"
|
||||||
#include "eglsync.h"
|
#include "eglsync.h"
|
||||||
|
|
||||||
|
#include "GL/mesa_glinterop.h"
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Macros to help return an API entrypoint.
|
* Macros to help return an API entrypoint.
|
||||||
|
Reference in New Issue
Block a user