Skip to contentSkip to conversation

liboauth2: Backport a patch to build with glibc 2.43

PATCH Peter Kjellerstedt 1 participant 1 message Mar 19 1 message not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

#1 lore raw

Please ignore. Wrong list.

//Peter

Quoted 78 lines

-----Original Message-----
From: [email protected] <bitbake- [email protected]> On Behalf Of Peter Kjellerstedt via lists.openembedded.org
Sent: den 19 mars 2026 03:49
To: [email protected]
Subject: [bitbake-devel] [meta-oe][PATCH] liboauth2: Backport a patch to build with glibc 2.43

---
 .../0002-Fix-use-of-strchr-with-new-GCC.patch | 33 +++++++++++++++++++
 .../liboauth2/liboauth2_2.2.0.bb              |  1 +
 2 files changed, 34 insertions(+)
 create mode 100644 meta-oe/recipes-support/liboauth2/liboauth2/0002-Fix-

use-of-strchr-with-new-GCC.patch

(quoted diff) +0 -0

strchr-with-new-GCC.patch b/meta-oe/recipes- support/liboauth2/liboauth2/0002-Fix-use-of-strchr-with-new-GCC.patch new file mode 100644
index 0000000000..65340e806a

meta-oe/recipes-support/liboauth2/liboauth2/0002-Fix-use-of-strchr- new file +0 -0

with-new-GCC.patch

meta-oe/recipes-support/liboauth2/liboauth2/0002-Fix-use-of-strchr- new file +15 -0
@@ -0,0 +1,33 @@
+From 0dcba079907d559550ee8d9a201d26203bb8aebd Mon Sep 17 00:00:00 2001
+From: Alexander Bokovoy <[email protected]>
+Date: Wed, 7 Jan 2026 11:41:37 +0200
+Subject: [PATCH] Fix use of strchr with new GCC
+
+According to C specification, 7.28.5.1, strchr() is a generic function
+and its string argument's type is promoted to the result. So if it is
+const char*, the result will be const char* as well.
+
+gcc in Fedora Rawhide (15.2.1 20251111 or later) implements this
+conformance, resulting in a compilation fail with
+-Werror=discarded-qualifiers.
+
+Signed-off-by: Alexander Bokovoy <[email protected]>
+Upstream-Status: Backport

[https://github.com/OpenIDC/liboauth2/commit/0dcba079907d559550ee8d9a201d2
6203bb8aebd]

meta-oe/recipes-support/liboauth2/liboauth2/0002-Fix-use-of-strchr- new file +18 -0
+Signed-off-by: Peter Kjellerstedt <[email protected]>
+---
+ src/jose.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/jose.c b/src/jose.c
+index fbaf661..a3441c8 100644
+--- a/src/jose.c
++++ b/src/jose.c
+@@ -993,7 +993,7 @@ char *oauth2_jose_jwt_header_peek(oauth2_log_t *log,
+ {
+ 	char *input = NULL, *result = NULL;
+ 	json_t *json = NULL;
+-	char *p = NULL;
++	const char *p = NULL;
+ 	size_t result_len;
+ 	char *rv = NULL;
+
meta- renamed from meta-oe/recipes-support/liboauth2/liboauth2_2.2.0.bb +0 -0

oe/recipes-support/liboauth2/liboauth2_2.2.0.bb
index 31d7aec69d..244cd51a2c 100644

meta-oe/recipes-support/liboauth2/liboauth2_2.2.0.bb +0 -0
@@ -6,6 +6,7 @@ LIC_FILES_CHKSUM =

"file://LICENSE;md5=2ee41112a44fe7014dce33e26468ba93"
SRC_URI = " \

git://github.com/OpenIDC/liboauth2;protocol=https;branch=master;tag=v${PV}

\
     file://0001-fix-clang-curl_easy_setopt-takes-a-long-not-an-int.patch
\
+    file://0002-Fix-use-of-strchr-with-new-GCC.patch \
     "

PV = "2.2.0"