From 0615a60349ecc9adc07ff41346849e0a1cb20c82 Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Mon, 12 Sep 2022 20:41:23 -0700 Subject: gstreamer1.0-plugins-base: Fix build with clang Signed-off-by: Khem Raj (cherry picked from commit 8324178f01ddf4b2da9e0b7bcbc4abde0b8c6aa8) --- ...rphymem.c-Typecast-result-of-gst_phymem_g.patch | 48 ++++++++++++++++++++++ .../gstreamer1.0-plugins-base_1.20.0.imx.bb | 1 + 2 files changed, 49 insertions(+) create mode 100644 recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0001-gstallocatorphymem.c-Typecast-result-of-gst_phymem_g.patch diff --git a/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0001-gstallocatorphymem.c-Typecast-result-of-gst_phymem_g.patch b/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0001-gstallocatorphymem.c-Typecast-result-of-gst_phymem_g.patch new file mode 100644 index 000000000..190571478 --- /dev/null +++ b/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base/0001-gstallocatorphymem.c-Typecast-result-of-gst_phymem_g.patch @@ -0,0 +1,48 @@ +From 071fd005ad6572767d7441c97549b1c904719944 Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Mon, 12 Sep 2022 20:29:25 -0700 +Subject: [PATCH] gstallocatorphymem.c: Typecast result of gst_phymem_get_phy + to guintptr + +This fixes a warning/error found with clang-15 + +Upstream-Status: Pending +Signed-off-by: Khem Raj +--- + gst-libs/gst/allocators/gstallocatorphymem.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/gst-libs/gst/allocators/gstallocatorphymem.c ++++ b/gst-libs/gst/allocators/gstallocatorphymem.c +@@ -225,7 +225,7 @@ static guintptr + gst_allocator_phymem_get_phys_addr (GstPhysMemoryAllocator * allocator, + GstMemory * mem) + { +- return gst_phymem_get_phy (mem); ++ return (guintptr)gst_phymem_get_phy (mem); + } + + static void +--- a/gst-libs/gst/gl/gstglphymemory.c ++++ b/gst-libs/gst/gl/gstglphymemory.c +@@ -337,7 +337,7 @@ gst_gl_physical_memory_setup_buffer (Gst + GST_VIDEO_INFO_HEIGHT (info), + viv_fmt, + memblk->vaddr, +- memblk->paddr, ++ (guint)memblk->paddr, + FALSE + }; + +--- a/gst/subparse/gstssaparse.c ++++ b/gst/subparse/gstssaparse.c +@@ -24,7 +24,9 @@ + #include "config.h" + #endif + ++#include /* isspace() */ + #include /* atoi() */ ++#include /* sscanf() */ + #include + + #include "gstssaparse.h" diff --git a/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_1.20.0.imx.bb b/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_1.20.0.imx.bb index 3fce3a589..ba1b97872 100644 --- a/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_1.20.0.imx.bb +++ b/recipes-multimedia/gstreamer/gstreamer1.0-plugins-base_1.20.0.imx.bb @@ -17,6 +17,7 @@ SRC_URI = "https://gstreamer.freedesktop.org/src/gst-plugins-base/gst-plugins-ba file://0001-ENGR00312515-get-caps-from-src-pad-when-query-caps.patch \ file://0003-viv-fb-Make-sure-config.h-is-included.patch \ file://0002-ssaparse-enhance-SSA-text-lines-parsing.patch \ + file://0001-gstallocatorphymem.c-Typecast-result-of-gst_phymem_g.patch \ " SRC_URI[sha256sum] = "96d8a6413ba9394fbec1217aeef63741a729d476a505a797c1d5337d8fa7c204" -- cgit v1.2.3-54-g00ecf From bc92857569e0c46a3b7f409cde2d6dd136d59d86 Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Mon, 12 Sep 2022 21:00:25 -0700 Subject: weston: Fix build with clang-15 Signed-off-by: Khem Raj (cherry picked from commit 0dad0e1e9d075a957cf334e68ec5f09afeb3c2bd) --- .../0001-g2d-renderer.c-Include-sys-stat.h.patch | 34 ++++++++++++++++++++++ recipes-graphics/wayland/weston_10.0.0.imx.bb | 4 ++- 2 files changed, 37 insertions(+), 1 deletion(-) create mode 100644 recipes-graphics/wayland/weston/0001-g2d-renderer.c-Include-sys-stat.h.patch diff --git a/recipes-graphics/wayland/weston/0001-g2d-renderer.c-Include-sys-stat.h.patch b/recipes-graphics/wayland/weston/0001-g2d-renderer.c-Include-sys-stat.h.patch new file mode 100644 index 000000000..b9cb31fbc --- /dev/null +++ b/recipes-graphics/wayland/weston/0001-g2d-renderer.c-Include-sys-stat.h.patch @@ -0,0 +1,34 @@ +From 4afe9b2f9ef24ce0c9bf1cd41f94ca45afa4f445 Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Mon, 12 Sep 2022 20:58:14 -0700 +Subject: [PATCH] g2d-renderer.c: Include sys/stat.h + +This is needed for getting stat() prototype, its flagged with clang-15 +as error. + +| ../git/libweston/renderer-g2d/g2d-renderer.c:2057:6: error: call to undeclared function 'stat'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration] +| if (stat(gr->drm_device, &dev_stat) != 0) { +| ^ +| 1 error generated. + +Upstream-Status: Pending +Signed-off-by: Khem Raj +--- + libweston/renderer-g2d/g2d-renderer.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/libweston/renderer-g2d/g2d-renderer.c b/libweston/renderer-g2d/g2d-renderer.c +index f59fc4ee..36a458fc 100644 +--- a/libweston/renderer-g2d/g2d-renderer.c ++++ b/libweston/renderer-g2d/g2d-renderer.c +@@ -41,6 +41,7 @@ + #include + #include + #include ++#include /* stat() */ + + #include + #include "g2d-renderer.h" +-- +2.37.3 + diff --git a/recipes-graphics/wayland/weston_10.0.0.imx.bb b/recipes-graphics/wayland/weston_10.0.0.imx.bb index 8fce4472a..a9f6ec139 100644 --- a/recipes-graphics/wayland/weston_10.0.0.imx.bb +++ b/recipes-graphics/wayland/weston_10.0.0.imx.bb @@ -160,7 +160,9 @@ DEFAULT_PREFERENCE = "-1" SRC_URI:remove = "https://wayland.freedesktop.org/releases/${BPN}-${PV}.tar.xz" SRC_URI:prepend = "git://source.codeaurora.org/external/imx/weston-imx.git;protocol=https;branch=${SRCBRANCH} " -SRC_URI += "file://0001-Revert-protocol-no-found-wayland-scanner-with-Yocto-.patch" +SRC_URI += "file://0001-Revert-protocol-no-found-wayland-scanner-with-Yocto-.patch \ + file://0001-g2d-renderer.c-Include-sys-stat.h.patch \ + " SRCBRANCH = "weston-imx-10.0" SRCREV = "c8c6e3106b03441db1037afa995f95fcb2f9f17d" -- cgit v1.2.3-54-g00ecf