summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2024-09-03 11:38:07 -0700
committergithub-actions[bot] <github-actions[bot]@users.noreply.github.com>2024-09-03 21:30:02 +0000
commit8178a66ad174431a4ce9f41f3ec0c630b5667aaf (patch)
tree6ce9d99f84fbbc181e1050e94330a7da20ab9749
parent01d9ff233a7ae41d39af436f9508103504708b58 (diff)
downloadmeta-freescale-8178a66ad174431a4ce9f41f3ec0c630b5667aaf.tar.gz
weston: Fix build with musl
Apply patch from core Signed-off-by: Khem Raj <raj.khem@gmail.com> (cherry picked from commit 250c1c169dd8eb2383d721a11ae1a214e7fb4603)
-rw-r--r--recipes-graphics/wayland/weston/0001-libweston-tools-Include-libgen.h-for-basename-signat.patch45
-rw-r--r--recipes-graphics/wayland/weston_12.0.4.imx.bb1
2 files changed, 46 insertions, 0 deletions
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 00000000..3f0b8ee0
--- /dev/null
+++ b/recipes-graphics/wayland/weston/0001-libweston-tools-Include-libgen.h-for-basename-signat.patch
@@ -0,0 +1,45 @@
1From 2a7c1797dd65467b7a0be63aa598307b92fb83b5 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Thu, 14 Dec 2023 09:13:54 -0800
4Subject: [PATCH] libweston,tools: Include libgen.h for basename signature
5
6Latest musl has removed the declaration from string.h [1] as it only
7implements POSIX version alone and string.h in glibc implements GNU
8version of basename. This now results in compile errors on musl.
9
10This might be a warning with older compilers but it is error with
11Clang-17+ as it treats -Wimplicit-function-declaration as error
12
13[1] https://git.musl-libc.org/cgit/musl/commit/?id=725e17ed6dff4d0cd22487bb64470881e86a92e7
14
15Upstream-Status: Submitted [https://gitlab.freedesktop.org/wayland/weston/-/merge_requests/1420]
16Signed-off-by: Khem Raj <raj.khem@gmail.com>
17---
18 libweston/backend-drm/libbacklight.c | 1 +
19 tools/zunitc/src/zunitc_impl.c | 1 +
20 2 files changed, 2 insertions(+)
21
22diff --git a/libweston/backend-drm/libbacklight.c b/libweston/backend-drm/libbacklight.c
23index ca7f2d68..74690fa7 100644
24--- a/libweston/backend-drm/libbacklight.c
25+++ b/libweston/backend-drm/libbacklight.c
26@@ -41,6 +41,7 @@
27 #include <drm.h>
28 #include <fcntl.h>
29 #include <malloc.h>
30+#include <libgen.h>
31 #include <string.h>
32 #include <errno.h>
33
34diff --git a/tools/zunitc/src/zunitc_impl.c b/tools/zunitc/src/zunitc_impl.c
35index 18f03015..9b460fa0 100644
36--- a/tools/zunitc/src/zunitc_impl.c
37+++ b/tools/zunitc/src/zunitc_impl.c
38@@ -27,6 +27,7 @@
39
40 #include <errno.h>
41 #include <fcntl.h>
42+#include <libgen.h>
43 #include <stdarg.h>
44 #include <stdbool.h>
45 #include <stdio.h>
diff --git a/recipes-graphics/wayland/weston_12.0.4.imx.bb b/recipes-graphics/wayland/weston_12.0.4.imx.bb
index d543900d..e24c0d15 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
18 file://weston.desktop \ 18 file://weston.desktop \
19 file://xwayland.weston-start \ 19 file://xwayland.weston-start \
20 file://systemd-notify.weston-start \ 20 file://systemd-notify.weston-start \
21 file://0001-libweston-tools-Include-libgen.h-for-basename-signat.patch \
21 " 22 "
22 23
23SRC_URI[sha256sum] = "eb686a7cf00992a23b17f192fca9a887313e92c346ee35d8575196983d656b4a" 24SRC_URI[sha256sum] = "eb686a7cf00992a23b17f192fca9a887313e92c346ee35d8575196983d656b4a"