Signed-off-by: Khem Raj <[email protected]>
---
 ...rator-Use-own-generic-htobe-template.patch | 49 +++++++++++++++++++
 .../recipes-bsp/rwmem/rwmem_2.0.bb            |  4 +-
 2 files changed, 52 insertions(+), 1 deletion(-)
 create mode 100644 
meta-oe/dynamic-layers/meta-python/recipes-bsp/rwmem/rwmem/0001-test_data_generator-Use-own-generic-htobe-template.patch

diff --git 
a/meta-oe/dynamic-layers/meta-python/recipes-bsp/rwmem/rwmem/0001-test_data_generator-Use-own-generic-htobe-template.patch
 
b/meta-oe/dynamic-layers/meta-python/recipes-bsp/rwmem/rwmem/0001-test_data_generator-Use-own-generic-htobe-template.patch
new file mode 100644
index 0000000000..2a8f826b47
--- /dev/null
+++ 
b/meta-oe/dynamic-layers/meta-python/recipes-bsp/rwmem/rwmem/0001-test_data_generator-Use-own-generic-htobe-template.patch
@@ -0,0 +1,49 @@
+From fd59aeedac8ab75d044026b8ff32adf9aa485dea Mon Sep 17 00:00:00 2001
+From: Khem Raj <[email protected]>
+Date: Wed, 24 Dec 2025 12:56:14 -0800
+Subject: [PATCH] test_data_generator: Use own generic htobe() template
+
+musl based builds expose this build failure where htobe32/htobe64 macros
+are in endian.h and it needs to be included. However, there is a local
+template in librwmem/endianness.h that can be used for
+better portability across platforms which
+might use different C library implementations
+
+
+Remove this patch when upgrading to 0.3 since the v2 tests are removed [1]
+
+[1] 
https://github.com/tomba/rwmem/commit/f9e0bffacd7520ee8975c4a36a9d47292d145ae9
+
+Upstream-Status: Inappropriate [Use of these macros are removed in master]
+
+Signed-off-by: Khem Raj <[email protected]>
+---
+ tests/test_data_generator.cpp | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/tests/test_data_generator.cpp b/tests/test_data_generator.cpp
+index 39e1322..94e732d 100644
+--- a/tests/test_data_generator.cpp
++++ b/tests/test_data_generator.cpp
+@@ -101,12 +101,12 @@ std::vector<uint8_t> TestRegisterFileBuilder::build() {
+
+     // Write header (RegisterFileData)
+     auto write_be32 = [&](uint32_t val) {
+-        uint32_t be_val = htobe32(val);
++        uint32_t be_val = htobe(val);
+         data.insert(data.end(), (uint8_t*)&be_val, (uint8_t*)&be_val + 4);
+     };
+
+     auto write_be64 = [&](uint64_t val) {
+-        uint64_t be_val = htobe64(val);
++        uint64_t be_val = htobe(val);
+         data.insert(data.end(), (uint8_t*)&be_val, (uint8_t*)&be_val + 8);
+     };
+
+@@ -169,4 +169,4 @@ std::vector<uint8_t> TestRegisterFileBuilder::build() {
+     }
+
+     return data;
+-}
+\ No newline at end of file
++}
diff --git a/meta-oe/dynamic-layers/meta-python/recipes-bsp/rwmem/rwmem_2.0.bb 
b/meta-oe/dynamic-layers/meta-python/recipes-bsp/rwmem/rwmem_2.0.bb
index aea81ee23f..b89da34736 100644
--- a/meta-oe/dynamic-layers/meta-python/recipes-bsp/rwmem/rwmem_2.0.bb
+++ b/meta-oe/dynamic-layers/meta-python/recipes-bsp/rwmem/rwmem_2.0.bb
@@ -16,7 +16,9 @@ DEPENDS += "fmt libinih"

 SRCREV = "d8dda76a0d8bc3356120d087f783d237602e0278"

-SRC_URI = 
"git://github.com/tomba/rwmem.git;protocol=https;name=rwmem;branch=master;tag=${PV}"
+SRC_URI = 
"git://github.com/tomba/rwmem.git;protocol=https;name=rwmem;branch=master;tag=${PV}
 \
+           
file://0001-test_data_generator-Use-own-generic-htobe-template.patch \
+                 "

 inherit meson pkgconfig

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

Reply via email to