1 --- a/src/egl/drivers/dri2/egl_dri2.c
2 +++ b/src/egl/drivers/dri2/egl_dri2.c
3 @@ -959,6 +959,7 @@ dri2_setup_extensions(_EGLDisplay *disp)
7 +#ifdef HAVE_X11_PLATFORM
8 #ifdef HAVE_DRI3_MODIFIERS
9 dri2_dpy->multibuffers_available =
10 (dri2_dpy->dri3_major_version > 1 ||
11 @@ -976,6 +977,7 @@ dri2_setup_extensions(_EGLDisplay *disp)
12 disp->Platform == _EGL_PLATFORM_XCB) &&
13 !debug_get_bool_option("LIBGL_KOPPER_DRI2", false))
18 loader_bind_extensions(dri2_dpy, optional_core_extensions,
19 @@ -1194,11 +1196,13 @@ dri2_display_create(void)
20 dri2_dpy->fd_render_gpu = -1;
21 dri2_dpy->fd_display_gpu = -1;
23 +#ifdef HAVE_X11_PLATFORM
24 #ifdef HAVE_DRI3_MODIFIERS
25 dri2_dpy->dri3_major_version = -1;
26 dri2_dpy->dri3_minor_version = -1;
27 dri2_dpy->present_major_version = -1;
28 dri2_dpy->present_minor_version = -1;