--- a/include/GL/mesa_glinterop.h 2017-08-07 07:04:30.000000000 -0500 +++ b/include/GL/mesa_glinterop.h 2017-08-19 06:39:12.000000000 -0500 @@ -58,8 +58,10 @@ #endif /* Forward declarations to avoid inclusion of GL/glx.h */ +#ifndef APPLE_GLX_CONTEXT_H struct _XDisplay; struct __GLXcontextRec; +#endif /* Forward declarations to avoid inclusion of EGL/egl.h */ typedef void *EGLDisplay;