egl: Protect use of gbm_dri with ifdef HAVE_DRM_PLATFORM
authorAnder Conselvan de Oliveira <ander.conselvan.de.oliveira@intel.com>
Tue, 8 Apr 2014 20:28:42 +0000 (23:28 +0300)
committerEmil Velikov <emil.l.velikov@gmail.com>
Fri, 25 Apr 2014 20:17:54 +0000 (21:17 +0100)
Otherwise it fails to compile if the drm egl platform is disabled.

Cc: "10.0" "10.1" <mesa-stable@lists.freedesktop.org>
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
src/egl/drivers/dri2/egl_dri2.c

index dc541add54e7cf47b2e4460f19938f9fa8672047..a132964ea2188da019f6e66223f5032e4ef088ff 100644 (file)
@@ -2013,10 +2013,12 @@ dri2_bind_wayland_display_wl(_EGLDriver *drv, _EGLDisplay *disp,
    if (!dri2_dpy->wl_server_drm)
           return EGL_FALSE;
 
+#ifdef HAVE_DRM_PLATFORM
    /* We have to share the wl_drm instance with gbm, so gbm can convert
     * wl_buffers to gbm bos. */
    if (dri2_dpy->gbm_dri)
       dri2_dpy->gbm_dri->wl_drm = dri2_dpy->wl_server_drm;
+#endif
 
    return EGL_TRUE;
 }