From: martin.jansa@gmail.com
To: openembedded-core@lists.openembedded.org
Cc: Martin Jansa <martin.jansa@gmail.com>
Subject: [scarthgap][PATCH] socat: fix native build on host with newer glibc
Date: Mon, 17 Aug 2026 19:45:12 +0200 [thread overview]
Message-ID: <20260817174512.2137333-1-martin.jansa@gmail.com> (raw)
From: Martin Jansa <martin.jansa@gmail.com>
Fixes:
../socat-1.8.0.0/filan.c: In function ?printtime?:
../socat-1.8.0.0/filan.c:1065:46: error: assignment of read-only location ?*(const char *)strchr(s, 10)?
1065 | if (strchr(s, '\n')) *strchr(s, '\n') = '\0';
| ^
Signed-off-by: Martin Jansa <martin.jansa@gmail.com>
---
...ixed-strchr-with-const-for-new-glibc.patch | 38 +++++++++++++++++++
.../socat/socat_1.8.0.0.bb | 1 +
2 files changed, 39 insertions(+)
create mode 100644 meta/recipes-connectivity/socat/files/0001-Fixed-strchr-with-const-for-new-glibc.patch
diff --git a/meta/recipes-connectivity/socat/files/0001-Fixed-strchr-with-const-for-new-glibc.patch b/meta/recipes-connectivity/socat/files/0001-Fixed-strchr-with-const-for-new-glibc.patch
new file mode 100644
index 0000000000..5a7c19294c
--- /dev/null
+++ b/meta/recipes-connectivity/socat/files/0001-Fixed-strchr-with-const-for-new-glibc.patch
@@ -0,0 +1,38 @@
+From 3033625d5a67514e3d74021fc39f7fcb542d7f2d Mon Sep 17 00:00:00 2001
+From: Gerhard Rieger <gerhard@dest-unreach.org>
+Date: Wed, 11 Feb 2026 14:06:25 +0100
+Subject: [PATCH] Fixed strchr with const for new glibc
+
+Upstream-Status: Backport [https://repo.or.cz/socat.git/commit/a7058c9340db0bf90bf4372de0ae87ad37f57735]
+Signed-off-by: Martin Jansa <martin.jansa@gmail.com>
+---
+ filan.c | 2 +-
+ xio-ip6.c | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/filan.c b/filan.c
+index 36def50..e256f74 100644
+--- a/filan.c
++++ b/filan.c
+@@ -1055,7 +1055,7 @@ const char *getfiletypestring(int st_mode) {
+ }
+
+ static int printtime(FILE *outfile, time_t time) {
+- const char *s;
++ char *s;
+
+ if (filan_rawoutput) {
+ fprintf(outfile, "\t"F_time, time);
+diff --git a/xio-ip6.c b/xio-ip6.c
+index bd94bdd..09abdd1 100644
+--- a/xio-ip6.c
++++ b/xio-ip6.c
+@@ -114,7 +114,7 @@ int xioparsenetwork_ip6(
+ struct xiorange *range,
+ const int ai_flags[2])
+ {
+- char *delimpos; /* absolute address of delimiter */
++ const char *delimpos; /* absolute address of delimiter */
+ size_t delimind; /* index of delimiter in string */
+ unsigned int bits; /* netmask bits */
+ char *endptr;
diff --git a/meta/recipes-connectivity/socat/socat_1.8.0.0.bb b/meta/recipes-connectivity/socat/socat_1.8.0.0.bb
index 156fd590ae..1be3a08802 100644
--- a/meta/recipes-connectivity/socat/socat_1.8.0.0.bb
+++ b/meta/recipes-connectivity/socat/socat_1.8.0.0.bb
@@ -11,6 +11,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
SRC_URI = "http://www.dest-unreach.org/socat/download/socat-${PV}.tar.bz2 \
file://0001-fix-compile-procan.c-failed.patch \
+ file://0001-Fixed-strchr-with-const-for-new-glibc.patch \
file://CVE-2024-54661.patch \
file://CVE-2026-56123.patch \
"
reply other threads:[~2026-08-17 17:45 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260817174512.2137333-1-martin.jansa@gmail.com \
--to=martin.jansa@gmail.com \
--cc=openembedded-core@lists.openembedded.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox