Fix compilation with libwayland < 1.10 (again)

wl_proxy_marshal_constructor_versioned was added in libwayland v1.10.0, use the
old way with wl_proxy_marshal_constructor for older versions instead.

Change-Id: I4514212e0b44ecbf200769759667186f71b279b6
Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
This commit is contained in:
Johan Klokkhammer Helsing 2018-10-05 12:06:41 +02:00 committed by Johan Helsing
parent 702fa089af
commit d78e0e3457

View File

@ -1064,8 +1064,13 @@ bool Scanner::process()
printf("static inline void *wlRegistryBind(struct ::wl_registry *registry, uint32_t name, const struct ::wl_interface *interface, uint32_t version)\n");
printf("{\n");
printf(" const uint32_t bindOpCode = 0;\n");
printf("#if (WAYLAND_VERSION_MAJOR == 1 && WAYLAND_VERSION_MINOR > 10) || WAYLAND_VERSION_MAJOR > 1\n");
printf(" return (void *) wl_proxy_marshal_constructor_versioned((struct wl_proxy *) registry,\n");
printf(" bindOpCode, interface, version, name, interface->name, version, NULL);\n");
printf(" bindOpCode, interface, version, name, interface->name, version, nullptr);\n");
printf("#else\n");
printf(" return (void *) wl_proxy_marshal_constructor((struct wl_proxy *) registry,\n");
printf(" bindOpCode, interface, name, interface->name, version, nullptr);\n");
printf("#endif\n");
printf("}\n");
printf("\n");
for (int j = 0; j < interfaces.size(); ++j) {