diff mbox series

[meta-oe] qad: add patch to build with glibc 2.43

Message ID 20260319171455.3012731-1-skandigraun@gmail.com
State Under Review
Headers show
Series [meta-oe] qad: add patch to build with glibc 2.43 | expand

Commit Message

Gyorgy Sarvari March 19, 2026, 5:14 p.m. UTC
As the subject says. Fixes compilation error:

| ../sources/qad-0.0+git/src/server.c:212:22: error: initialization discards 'const' qualifier from pointer target type [-Werror=discarded-qualifiers]
|   212 |   char *pLastSlash = strrchr(url, '/');

Signed-off-by: Gyorgy Sarvari <skandigraun@gmail.com>
---
 ...0001-fix-compilation-with-glibc-2.43.patch | 30 +++++++++++++++++++
 meta-oe/recipes-extended/qad/qad_git.bb       |  3 +-
 2 files changed, 32 insertions(+), 1 deletion(-)
 create mode 100644 meta-oe/recipes-extended/qad/qad/0001-fix-compilation-with-glibc-2.43.patch
diff mbox series

Patch

diff --git a/meta-oe/recipes-extended/qad/qad/0001-fix-compilation-with-glibc-2.43.patch b/meta-oe/recipes-extended/qad/qad/0001-fix-compilation-with-glibc-2.43.patch
new file mode 100644
index 0000000000..3bebcc1b11
--- /dev/null
+++ b/meta-oe/recipes-extended/qad/qad/0001-fix-compilation-with-glibc-2.43.patch
@@ -0,0 +1,30 @@ 
+From 030b4983e3515b214f4faa61ce1b7c552c007340 Mon Sep 17 00:00:00 2001
+From: Gyorgy Sarvari <skandigraun@gmail.com>
+Date: Thu, 19 Mar 2026 18:05:00 +0100
+Subject: [PATCH] fix compilation with glibc 2.43
+
+Fioxes compilation error:
+| ../sources/qad-0.0+git/src/server.c:212:22: error: initialization discards 'const' qualifier from pointer target type [-Werror=discarded-qualifiers]
+|   212 |   char *pLastSlash = strrchr(url, '/');
+
+Upstream-Status: Submitted [https://gitlab.com/CodethinkLabs/qad/qad/-/merge_requests/56]
+Signed-off-by: Gyorgy Sarvari <skandigraun@gmail.com>
+---
+ src/server.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/src/server.c b/src/server.c
+index 648fb46..11ec114 100644
+--- a/src/server.c
++++ b/src/server.c
+@@ -307,8 +307,8 @@ void qad_text(const char *post_data, int post_data_size, qad_backend_t *backend,
+ void qad_screenshot(struct MHD_Connection *connection, const char *url,
+                     qad_backend_t *backend, connection_info_struct_t *con_info,
+                     char *error) {
+-  char *pLastSlash = strrchr(url, '/');
+-  char *screenName = pLastSlash ? pLastSlash + 1 : NULL;
++  const char *pLastSlash = strrchr(url, '/');
++  const char *screenName = pLastSlash ? pLastSlash + 1 : NULL;
+   int screenNumber = -1;
+ 
+   if (screenName && *screenName != '\0') {
diff --git a/meta-oe/recipes-extended/qad/qad_git.bb b/meta-oe/recipes-extended/qad/qad_git.bb
index 189d2f9d15..4a80b6738f 100644
--- a/meta-oe/recipes-extended/qad/qad_git.bb
+++ b/meta-oe/recipes-extended/qad/qad_git.bb
@@ -10,7 +10,8 @@  LIC_FILES_CHKSUM = "file://LICENSE;md5=402cce7fbcb6ea9ab5a0378dd7f40806 \
                     file://openqa/COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
                    "
 SRC_URI = "git://gitlab.com/CodethinkLabs/qad/qad;branch=main;protocol=https \
-           file://0001-Fix-warnings-found-by-clang-compiler.patch"
+           file://0001-Fix-warnings-found-by-clang-compiler.patch \
+           file://0001-fix-compilation-with-glibc-2.43.patch"
 
 SRCREV = "ae0c099c1fdc0ca6f5d631cea6b302937122b362"