From: Brian <brian@localhost.localdomain> Fedora 24 only has Wayland 1.10, not 1.11. This change lets us build Mesa/EGL with Wayland 1.10 on that distro.
A new wayland-compat.h file has stubs for the wl_proxy_create_wrapper() and wl_proxy_wrapper_destroy() functions which were added in Wayland 1.11. Tested with Wayland desktop on Fedora 24. --- configure.ac | 2 +- src/egl/drivers/dri2/egl_dri2.c | 1 + src/egl/drivers/dri2/platform_wayland.c | 1 + src/egl/wayland/wayland-drm/wayland-compat.h | 26 ++++++++++++++++++++++++++ 4 files changed, 29 insertions(+), 1 deletion(-) create mode 100644 src/egl/wayland/wayland-drm/wayland-compat.h diff --git a/configure.ac b/configure.ac index 7d92b33..a9fb4de 100644 --- a/configure.ac +++ b/configure.ac @@ -90,7 +90,7 @@ GLPROTO_REQUIRED=1.4.14 LIBOMXIL_BELLAGIO_REQUIRED=0.0 LIBVA_REQUIRED=0.38.0 VDPAU_REQUIRED=1.1 -WAYLAND_REQUIRED=1.11 +WAYLAND_REQUIRED=1.10 XCB_REQUIRED=1.9.3 XCBDRI2_REQUIRED=1.8 XCBGLX_REQUIRED=1.8.1 diff --git a/src/egl/drivers/dri2/egl_dri2.c b/src/egl/drivers/dri2/egl_dri2.c index 2cab7d0..d69edba 100644 --- a/src/egl/drivers/dri2/egl_dri2.c +++ b/src/egl/drivers/dri2/egl_dri2.c @@ -53,6 +53,7 @@ #ifdef HAVE_WAYLAND_PLATFORM #include "wayland-drm.h" #include "wayland-drm-client-protocol.h" +#include "wayland-compat.h" #endif #include "egl_dri2.h" diff --git a/src/egl/drivers/dri2/platform_wayland.c b/src/egl/drivers/dri2/platform_wayland.c index a3380f2..460ef28 100644 --- a/src/egl/drivers/dri2/platform_wayland.c +++ b/src/egl/drivers/dri2/platform_wayland.c @@ -43,6 +43,7 @@ #include "loader.h" #include <wayland-client.h> +#include "wayland-compat.h" #include "wayland-drm-client-protocol.h" enum wl_drm_format_flags { diff --git a/src/egl/wayland/wayland-drm/wayland-compat.h b/src/egl/wayland/wayland-drm/wayland-compat.h new file mode 100644 index 0000000..4454721 --- /dev/null +++ b/src/egl/wayland/wayland-drm/wayland-compat.h @@ -0,0 +1,26 @@ +#ifndef WAYLAND_COMPAT_H +#define WAYLAND_COMPAT_H + +#include <wayland-version.h> + + +/** Wayland 1.10 and older don't have the proxy wrapper functions */ +#if WAYLAND_VERSION_MAJOR * 100 + WAYLAND_VERSION_MINOR < 111 + +struct wl_display; + +static inline struct wl_display * +wl_proxy_create_wrapper(struct wl_display *d) +{ + return d; +} + +static inline void +wl_proxy_wrapper_destroy(struct wl_display *d) +{ +} + +#endif + + +#endif // WAYLAND_COMPAT_H -- 1.9.1 _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev