diff -Nurp 1/include/GL/mesa_glinterop.h 2/include/GL/mesa_glinterop.h --- 1/include/GL/mesa_glinterop.h 2016-04-26 20:30:43.000000000 +0000 +++ 2/include/GL/mesa_glinterop.h 2016-04-26 20:33:16.000000000 +0000 @@ -50,7 +50,11 @@ #ifndef MESA_GLINTEROP_H #define MESA_GLINTEROP_H +#if defined(MESA_EGL_NO_X11_HEADERS) +#include +#else #include +#endif #include #ifdef __cplusplus @@ -219,6 +223,7 @@ typedef struct _mesa_glinterop_export_ou } mesa_glinterop_export_out; +#if !defined(MESA_EGL_NO_X11_HEADERS) /** * Query device information. * @@ -232,6 +237,7 @@ typedef struct _mesa_glinterop_export_ou GLAPI int GLAPIENTRY MesaGLInteropGLXQueryDeviceInfo(Display *dpy, GLXContext context, mesa_glinterop_device_info *out); +#endif /** @@ -243,6 +249,7 @@ MesaGLInteropEGLQueryDeviceInfo(EGLDispl mesa_glinterop_device_info *out); +#if !defined(MESA_EGL_NO_X11_HEADERS) /** * Create and return a DMABUF handle corresponding to the given OpenGL * object, and return other parameters about the OpenGL object. @@ -259,6 +266,7 @@ GLAPI int GLAPIENTRY MesaGLInteropGLXExportObject(Display *dpy, GLXContext context, const mesa_glinterop_export_in *in, mesa_glinterop_export_out *out); +#endif /** @@ -270,13 +278,18 @@ MesaGLInteropEGLExportObject(EGLDisplay const mesa_glinterop_export_in *in, mesa_glinterop_export_out *out); + +#if !defined(MESA_EGL_NO_X11_HEADERS) typedef int (APIENTRYP PFNMESAGLINTEROPGLXQUERYDEVICEINFOPROC)(Display *dpy, GLXContext context, mesa_glinterop_device_info *out); +#endif typedef int (APIENTRYP PFNMESAGLINTEROPEGLQUERYDEVICEINFOPROC)(EGLDisplay dpy, EGLContext context, mesa_glinterop_device_info *out); +#if !defined(MESA_EGL_NO_X11_HEADERS) typedef int (APIENTRYP PFNMESAGLINTEROPGLXEXPORTOBJECTPROC)(Display *dpy, GLXContext context, const mesa_glinterop_export_in *in, mesa_glinterop_export_out *out); +#endif typedef int (APIENTRYP PFNMESAGLINTEROPEGLEXPORTOBJECTPROC)(EGLDisplay dpy, EGLContext context, const mesa_glinterop_export_in *in, mesa_glinterop_export_out *out);