From 0d3e438d080433ed5d203c876e7de6c7f8a14f98 Mon Sep 17 00:00:00 2001 From: Ivan Nikolaenko Date: Mon, 20 Jun 2022 16:03:21 +0300 Subject: [PATCH] build: fix possible race/error for some backends There is missing dependency on linux-dmabuf-unstable-v1-server-protocol.h header file in backend-headless, backend-drm and backend-x11. That files do not depend on that header, in fact. But by this moment they've had that implicit dependency due to linux-dmabuf.h header. With specific set of meson configure options the protocol header is not generated at the right time, what causes build error in 100% cases using small amount of building threads (from -j1 to -j8). Signed-off-by: Ivan Nikolaenko --- libweston/backend-drm/state-propose.c | 1 + libweston/compositor.c | 1 + libweston/linux-dmabuf.c | 1 + libweston/linux-dmabuf.h | 1 - 4 files changed, 3 insertions(+), 1 deletion(-) diff --git a/libweston/backend-drm/state-propose.c b/libweston/backend-drm/state-propose.c index 1f4dccc7..1d4943b3 100644 --- a/libweston/backend-drm/state-propose.c +++ b/libweston/backend-drm/state-propose.c @@ -41,6 +41,7 @@ #include "color.h" #include "linux-dmabuf.h" #include "presentation-time-server-protocol.h" +#include "linux-dmabuf-unstable-v1-server-protocol.h" enum drm_output_propose_state_mode { DRM_OUTPUT_PROPOSE_STATE_MIXED, /**< mix renderer & planes */ diff --git a/libweston/compositor.c b/libweston/compositor.c index bd1ad5e8..5448e8ac 100644 --- a/libweston/compositor.c +++ b/libweston/compositor.c @@ -59,6 +59,7 @@ #include #include #include "linux-dmabuf.h" +#include "linux-dmabuf-unstable-v1-server-protocol.h" #include "viewporter-server-protocol.h" #include "presentation-time-server-protocol.h" #include "xdg-output-unstable-v1-server-protocol.h" diff --git a/libweston/linux-dmabuf.c b/libweston/linux-dmabuf.c index 21de498d..b73508e3 100644 --- a/libweston/linux-dmabuf.c +++ b/libweston/linux-dmabuf.c @@ -35,6 +35,7 @@ #include #include "linux-dmabuf.h" +#include "linux-dmabuf-unstable-v1-server-protocol.h" #include "shared/os-compatibility.h" #include "libweston-internal.h" #include "shared/weston-drm-fourcc.h" diff --git a/libweston/linux-dmabuf.h b/libweston/linux-dmabuf.h index 7cae93c5..32a7cb56 100644 --- a/libweston/linux-dmabuf.h +++ b/libweston/linux-dmabuf.h @@ -27,7 +27,6 @@ #define WESTON_LINUX_DMABUF_H #include -#include "linux-dmabuf-unstable-v1-server-protocol.h" #define MAX_DMABUF_PLANES 4