1 diff --git a/src/egl/drivers/dri2/egl_dri2.c b/src/egl/drivers/dri2/egl_dri2.c
2 index e326215e523..71f71262b86 100644
5 @@ -1048,6 +1048,7 @@ dri2_setup_extensions(_EGLDisplay *disp)
9 +#ifdef HAVE_X11_PLATFORM
10 #ifdef HAVE_DRI3_MODIFIERS
11 dri2_dpy->multibuffers_available =
12 (dri2_dpy->dri3_major_version > 1 ||
13 @@ -1057,6 +1058,7 @@ dri2_setup_extensions(_EGLDisplay *disp)
14 (dri2_dpy->present_major_version == 1 &&
15 dri2_dpy->present_minor_version >= 2)) &&
16 (dri2_dpy->image && dri2_dpy->image->base.version >= 15);
20 loader_bind_extensions(dri2_dpy, optional_core_extensions,