From 8178a66ad174431a4ce9f41f3ec0c630b5667aaf Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Tue, 3 Sep 2024 11:38:07 -0700 Subject: [PATCH] weston: Fix build with musl Apply patch from core Signed-off-by: Khem Raj (cherry picked from commit 250c1c169dd8eb2383d721a11ae1a214e7fb4603) --- ...Include-libgen.h-for-basename-signat.patch | 45 +++++++++++++++++++ recipes-graphics/wayland/weston_12.0.4.imx.bb | 1 + 2 files changed, 46 insertions(+) create mode 100644 recipes-graphics/wayland/weston/0001-libweston-tools-Include-libgen.h-for-basename-signat.patch diff --git a/recipes-graphics/wayland/weston/0001-libweston-tools-Include-libgen.h-for-basename-signat.patch b/recipes-graphics/wayland/weston/0001-libweston-tools-Include-libgen.h-for-basename-signat.patch new file mode 100644 index 000000000..3f0b8ee07 --- /dev/null +++ b/recipes-graphics/wayland/weston/0001-libweston-tools-Include-libgen.h-for-basename-signat.patch @@ -0,0 +1,45 @@ +From 2a7c1797dd65467b7a0be63aa598307b92fb83b5 Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Thu, 14 Dec 2023 09:13:54 -0800 +Subject: [PATCH] libweston,tools: Include libgen.h for basename signature + +Latest musl has removed the declaration from string.h [1] as it only +implements POSIX version alone and string.h in glibc implements GNU +version of basename. This now results in compile errors on musl. + +This might be a warning with older compilers but it is error with +Clang-17+ as it treats -Wimplicit-function-declaration as error + +[1] https://git.musl-libc.org/cgit/musl/commit/?id=725e17ed6dff4d0cd22487bb64470881e86a92e7 + +Upstream-Status: Submitted [https://gitlab.freedesktop.org/wayland/weston/-/merge_requests/1420] +Signed-off-by: Khem Raj +--- + libweston/backend-drm/libbacklight.c | 1 + + tools/zunitc/src/zunitc_impl.c | 1 + + 2 files changed, 2 insertions(+) + +diff --git a/libweston/backend-drm/libbacklight.c b/libweston/backend-drm/libbacklight.c +index ca7f2d68..74690fa7 100644 +--- a/libweston/backend-drm/libbacklight.c ++++ b/libweston/backend-drm/libbacklight.c +@@ -41,6 +41,7 @@ + #include + #include + #include ++#include + #include + #include + +diff --git a/tools/zunitc/src/zunitc_impl.c b/tools/zunitc/src/zunitc_impl.c +index 18f03015..9b460fa0 100644 +--- a/tools/zunitc/src/zunitc_impl.c ++++ b/tools/zunitc/src/zunitc_impl.c +@@ -27,6 +27,7 @@ + + #include + #include ++#include + #include + #include + #include diff --git a/recipes-graphics/wayland/weston_12.0.4.imx.bb b/recipes-graphics/wayland/weston_12.0.4.imx.bb index d543900d2..e24c0d152 100644 --- a/recipes-graphics/wayland/weston_12.0.4.imx.bb +++ b/recipes-graphics/wayland/weston_12.0.4.imx.bb @@ -18,6 +18,7 @@ SRC_URI = "https://gitlab.freedesktop.org/wayland/weston/-/releases/${PV}/downlo file://weston.desktop \ file://xwayland.weston-start \ file://systemd-notify.weston-start \ + file://0001-libweston-tools-Include-libgen.h-for-basename-signat.patch \ " SRC_URI[sha256sum] = "eb686a7cf00992a23b17f192fca9a887313e92c346ee35d8575196983d656b4a"