From: Alexander Kanavin <[email protected]>

Add a patch to fix musl failures.

Signed-off-by: Alexander Kanavin <[email protected]>
---
 ...-egl.cpp-add-missing-unistd.h-header.patch | 36 +++++++++++++++++++
 ...fdo_1.16.0.bb => wpebackend-fdo_1.16.1.bb} |  6 ++--
 2 files changed, 40 insertions(+), 2 deletions(-)
 create mode 100644 
meta/recipes-sato/webkit/wpebackend-fdo/0001-src-ws-egl.cpp-add-missing-unistd.h-header.patch
 rename meta/recipes-sato/webkit/{wpebackend-fdo_1.16.0.bb => 
wpebackend-fdo_1.16.1.bb} (77%)

diff --git 
a/meta/recipes-sato/webkit/wpebackend-fdo/0001-src-ws-egl.cpp-add-missing-unistd.h-header.patch
 
b/meta/recipes-sato/webkit/wpebackend-fdo/0001-src-ws-egl.cpp-add-missing-unistd.h-header.patch
new file mode 100644
index 0000000000..ccb79cfd8f
--- /dev/null
+++ 
b/meta/recipes-sato/webkit/wpebackend-fdo/0001-src-ws-egl.cpp-add-missing-unistd.h-header.patch
@@ -0,0 +1,36 @@
+From cc7c8ef7b92849ad97f402f51d88bc6136a1eb9b Mon Sep 17 00:00:00 2001
+From: Alexander Kanavin <[email protected]>
+Date: Fri, 19 Dec 2025 15:00:16 +0100
+Subject: [PATCH] src/ws-egl.cpp: add missing unistd.h header
+
+This addresses build failures with musl:
+
+| ../../../../../../workspace/sources/wpebackend-fdo/src/ws-egl.cpp: In 
destructor 'virtual WS::ImplEGL::~ImplEGL()':
+| ../../../../../../workspace/sources/wpebackend-fdo/src/ws-egl.cpp:83:9: 
error: 'close' was not declared in this scope; did you mean 'clone'?
+|    83 |         close(m_dmabuf.formatTable.fd);
+|       |         ^~~~~
+|       |         clone
+| ../../../../../../workspace/sources/wpebackend-fdo/src/ws-egl.cpp: In member 
function 'void WS::ImplEGL::initFormatTable()':
+| ../../../../../../workspace/sources/wpebackend-fdo/src/ws-egl.cpp:397:15: 
error: 'ftruncate' was not declared in this scope; did you mean 'strncat'?
+|   397 |         ret = ftruncate(fd, size);
+|       |               ^~~~~~~~~
+|       |               strncat
+
+Upstream-Status: Submitted [https://github.com/Igalia/WPEBackend-fdo/pull/203]
+Signed-off-by: Alexander Kanavin <[email protected]>
+---
+ src/ws-egl.cpp | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/src/ws-egl.cpp b/src/ws-egl.cpp
+index 76d6194..cc7a8f2 100644
+--- a/src/ws-egl.cpp
++++ b/src/ws-egl.cpp
+@@ -33,6 +33,7 @@
+ #include <vector>
+ #include <sys/mman.h>
+ #include <sys/stat.h>
++#include <unistd.h>
+ 
+ #ifndef EGL_WL_bind_wayland_display
+ #define EGL_WAYLAND_BUFFER_WL 0x31D5
diff --git a/meta/recipes-sato/webkit/wpebackend-fdo_1.16.0.bb 
b/meta/recipes-sato/webkit/wpebackend-fdo_1.16.1.bb
similarity index 77%
rename from meta/recipes-sato/webkit/wpebackend-fdo_1.16.0.bb
rename to meta/recipes-sato/webkit/wpebackend-fdo_1.16.1.bb
index aa6c58d176..11a1ce6bd7 100644
--- a/meta/recipes-sato/webkit/wpebackend-fdo_1.16.0.bb
+++ b/meta/recipes-sato/webkit/wpebackend-fdo_1.16.1.bb
@@ -12,8 +12,10 @@ inherit meson features_check pkgconfig
 
 REQUIRED_DISTRO_FEATURES = "opengl"
 
-SRC_URI = "https://wpewebkit.org/releases/${BPN}-${PV}.tar.xz";
-SRC_URI[sha256sum] = 
"beddf321232d5bd08106c179dbc600f8ce88eb3620b4a59a6329063b78f64635"
+SRC_URI = "https://wpewebkit.org/releases/${BPN}-${PV}.tar.xz \
+           file://0001-src-ws-egl.cpp-add-missing-unistd.h-header.patch \
+           "
+SRC_URI[sha256sum] = 
"544ae14012f8e7e426b8cb522eb0aaaac831ad7c35601d1cf31d37670e0ebb3b"
 
 # Especially helps compiling with clang which enable this as error when
 # using c++11
-- 
2.47.3

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#228434): 
https://lists.openembedded.org/g/openembedded-core/message/228434
Mute This Topic: https://lists.openembedded.org/mt/116907490/21656
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to