summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJörg Sommer <joerg.sommer@navimatix.de>2026-03-14 13:00:00 +0100
committerKhem Raj <raj.khem@gmail.com>2026-03-18 14:33:25 -0700
commit9a40804aa860956cb289994af8fbfcad935a009e (patch)
tree5097b45521e3490850c34bb88920e311a32fd840
parent991ce2b4cb1a9f9d9af0076d9b0c31b8b7b1d0fe (diff)
downloadmeta-openembedded-9a40804aa860956cb289994af8fbfcad935a009e.tar.gz
gd: Add patch to fix compiler error about missing const
Gcc complains about: | ../../sources/gd-2.3.3/src/gd_filename.c: In function 'ftype': | ../../sources/gd-2.3.3/src/gd_filename.c:99:9: error: assignment discards 'const' qualifier from pointer target type [-Werror=discarded-qualifiers] | 99 | ext = strrchr(filename, '.'); | | ^ | cc1: all warnings being treated as errors Even the newest git master commit does not fix this. Signed-off-by: Jörg Sommer <joerg.sommer@navimatix.de> Signed-off-by: Khem Raj <raj.khem@gmail.com>
-rw-r--r--meta-oe/recipes-support/gd/gd/Fix-ftype-missing-const.patch23
-rw-r--r--meta-oe/recipes-support/gd/gd_2.3.3.bb1
2 files changed, 24 insertions, 0 deletions
diff --git a/meta-oe/recipes-support/gd/gd/Fix-ftype-missing-const.patch b/meta-oe/recipes-support/gd/gd/Fix-ftype-missing-const.patch
new file mode 100644
index 0000000000..294979ffd9
--- /dev/null
+++ b/meta-oe/recipes-support/gd/gd/Fix-ftype-missing-const.patch
@@ -0,0 +1,23 @@
1gcc complains about
2
3| ../../sources/gd-2.3.3/src/gd_filename.c: In function 'ftype':
4| ../../sources/gd-2.3.3/src/gd_filename.c:99:9: error: assignment discards 'const' qualifier from pointer target type [-Werror=discarded-qualifiers]
5| 99 | ext = strrchr(filename, '.');
6| | ^
7| cc1: all warnings being treated as errors
8
9Upstream-Status: Submitted [https://github.com/libgd/libgd/issues/985]
10
11diff --git i/src/gd_filename.c w/src/gd_filename.c
12index 7ce4817f..89b25204 100644
13--- i/src/gd_filename.c
14+++ w/src/gd_filename.c
15@@ -93,7 +93,7 @@ static const struct FileType {
16 static const struct FileType *
17 ftype(const char *filename) {
18 int n;
19- char *ext;
20+ const char *ext;
21
22 /* Find the file extension (i.e. the last period in the string. */
23 ext = strrchr(filename, '.');
diff --git a/meta-oe/recipes-support/gd/gd_2.3.3.bb b/meta-oe/recipes-support/gd/gd_2.3.3.bb
index ea5c487c52..0d7a6d34f9 100644
--- a/meta-oe/recipes-support/gd/gd_2.3.3.bb
+++ b/meta-oe/recipes-support/gd/gd_2.3.3.bb
@@ -15,6 +15,7 @@ DEPENDS = "freetype libpng jpeg zlib tiff"
15 15
16SRC_URI = "git://github.com/libgd/libgd.git;nobranch=1;protocol=https \ 16SRC_URI = "git://github.com/libgd/libgd.git;nobranch=1;protocol=https \
17 file://0001-Fix-deprecared-function-prototypes.patch \ 17 file://0001-Fix-deprecared-function-prototypes.patch \
18 file://Fix-ftype-missing-const.patch \
18 " 19 "
19 20
20SRCREV = "b5319a41286107b53daa0e08e402aa1819764bdc" 21SRCREV = "b5319a41286107b53daa0e08e402aa1819764bdc"