--- a/src/meson.build.orig +++ b/src/meson.build @@ -81,8 +81,7 @@ endif if meson.is_cross_build() or not get_option('scanner') - scanner_dep = dependency('wayland-scanner', native: true, version: meson.project_version()) - wayland_scanner_for_build = find_program(scanner_dep.get_variable(pkgconfig: 'wayland_scanner')) + wayland_scanner_for_build = find_program('wayland-scanner', native: true) else wayland_scanner_for_build = wayland_scanner endif --- a/src/wayland-client.c.orig +++ b/src/wayland-client.c @@ -649,6 +649,11 @@ wl_proxy_add_listener(struct wl_proxy *proxy, void (**implementation)(void), void *data) { + if (!proxy) { + fprintf(stderr, "FATAL: wl_proxy_add_listener(NULL) caller=%p -- returning error\n", + __builtin_return_address(0)); + return -1; + } if (proxy->flags & WL_PROXY_FLAG_WRAPPER) wl_abort("Proxy %p is a wrapper\n", proxy); @@ -2442,6 +2447,7 @@ WL_EXPORT uint32_t wl_proxy_get_version(struct wl_proxy *proxy) { + if (!proxy) return 0; return proxy->version; } @@ -2560,6 +2566,7 @@ WL_EXPORT struct wl_display * wl_proxy_get_display(struct wl_proxy *proxy) { + if (!proxy) return NULL; return proxy->display; } --- a/src/connection.c.orig +++ b/src/connection.c @@ -37,6 +37,9 @@ #include #include #include +#ifndef MSG_NOSIGNAL +#define MSG_NOSIGNAL 0 +#endif #include #include