Add a patch to fix build with gcc14+musl

Signed-off-by: Khem Raj <raj.k...@gmail.com>
---
 ...-Pass-correct-parameter-type-to-send.patch | 35 +++++++++++++++++++
 ...syslog_8.2402.0.bb => rsyslog_8.2404.0.bb} |  4 +--
 2 files changed, 37 insertions(+), 2 deletions(-)
 create mode 100644 
meta-oe/recipes-extended/rsyslog/rsyslog/0001-tests-tcpflood.c-Pass-correct-parameter-type-to-send.patch
 rename meta-oe/recipes-extended/rsyslog/{rsyslog_8.2402.0.bb => 
rsyslog_8.2404.0.bb} (97%)

diff --git 
a/meta-oe/recipes-extended/rsyslog/rsyslog/0001-tests-tcpflood.c-Pass-correct-parameter-type-to-send.patch
 
b/meta-oe/recipes-extended/rsyslog/rsyslog/0001-tests-tcpflood.c-Pass-correct-parameter-type-to-send.patch
new file mode 100644
index 0000000000..5df29e7d90
--- /dev/null
+++ 
b/meta-oe/recipes-extended/rsyslog/rsyslog/0001-tests-tcpflood.c-Pass-correct-parameter-type-to-send.patch
@@ -0,0 +1,35 @@
+From 1e0a77d8a5ae7cd0223afadf46cdbb540119774d Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.k...@gmail.com>
+Date: Sat, 11 May 2024 23:31:46 -0700
+Subject: [PATCH] tests/tcpflood.c: Pass correct parameter type to sendto()
+
+Fixes build with GCC-14 and musl
+
+../../rsyslog-8.2404.0/tests/tcpflood.c:811:70: error: passing argument 5 of 
'sendto' from incompatible pointer type [-Wincompatible-pointer-types]
+  811 |                         lenSend = sendto(udpsockout, buf, lenBuf, 0, 
&udpRcvr, sizeof(udpRcvr));
+      |                                                                      
^~~~~~~~
+      |                                                                      |
+      |                                                                      
struct sockaddr_in *
+
+Upstream-Status: Pending
+Signed-off-by: Khem Raj <raj.k...@gmail.com>
+---
+ tests/tcpflood.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/tests/tcpflood.c b/tests/tcpflood.c
+index bd8edaf..0feda23 100644
+--- a/tests/tcpflood.c
++++ b/tests/tcpflood.c
+@@ -808,7 +808,7 @@ int sendMessages(struct instdata *inst)
+                       }
+                       lenSend = sendPlainTCP(socknum, buf, lenBuf, 
&error_number);
+               } else if(transport == TP_UDP) {
+-                      lenSend = sendto(udpsockout, buf, lenBuf, 0, &udpRcvr, 
sizeof(udpRcvr));
++                      lenSend = sendto(udpsockout, buf, lenBuf, 0, (const 
struct sockaddr *)&udpRcvr, sizeof(udpRcvr));
+                       error_number = errno;
+               } else if(transport == TP_TLS) {
+                       if(sockArray[socknum] == -1) {
+-- 
+2.45.0
+
diff --git a/meta-oe/recipes-extended/rsyslog/rsyslog_8.2402.0.bb 
b/meta-oe/recipes-extended/rsyslog/rsyslog_8.2404.0.bb
similarity index 97%
rename from meta-oe/recipes-extended/rsyslog/rsyslog_8.2402.0.bb
rename to meta-oe/recipes-extended/rsyslog/rsyslog_8.2404.0.bb
index af46cc14d7..5152984249 100644
--- a/meta-oe/recipes-extended/rsyslog/rsyslog_8.2402.0.bb
+++ b/meta-oe/recipes-extended/rsyslog/rsyslog_8.2404.0.bb
@@ -25,14 +25,14 @@ SRC_URI = 
"https://www.rsyslog.com/files/download/rsyslog/${BPN}-${PV}.tar.gz \
            file://use-pkgconfig-to-check-libgcrypt.patch \
            file://run-ptest \
            file://0001-tests-disable-the-check-for-inotify.patch \
+           
file://0001-tests-tcpflood.c-Pass-correct-parameter-type-to-send.patch \
 "
 
 SRC_URI:append:libc-musl = " \
     file://0001-Include-sys-time-h.patch \
     file://disable-omfile-outchannel.patch \
 "
-
-SRC_URI[sha256sum] = 
"acbdd8579489df36b4a383dc6909a61b7623807f0aff54c062115f2de7ea85ba"
+SRC_URI[sha256sum] = 
"30528d140ec1b1f079224081fa37df6e06587ff42b02e3e61f2daa0526c54d33"
 
 UPSTREAM_CHECK_URI = "https://github.com/rsyslog/rsyslog/releases";
 UPSTREAM_CHECK_REGEX = "(?P<pver>\d+(\.\d+)+)"
-- 
2.45.0

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#110326): 
https://lists.openembedded.org/g/openembedded-devel/message/110326
Mute This Topic: https://lists.openembedded.org/mt/106058747/21656
Group Owner: openembedded-devel+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-devel/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to