summaryrefslogtreecommitdiffstats
path: root/meta-networking
diff options
context:
space:
mode:
authormark.yang <mark.yang@lge.com>2025-04-02 15:38:17 +0900
committerKhem Raj <raj.khem@gmail.com>2025-04-02 07:29:32 -0700
commitc022f3ec33cb019aa6ac56d84c8cc4713f1ac645 (patch)
tree8f24a4dacc82e0e1baa47e759da4c77885b41e20 /meta-networking
parent0a4e093940df5b21ae216b9b4ed1488bdb9d23ce (diff)
downloadmeta-openembedded-c022f3ec33cb019aa6ac56d84c8cc4713f1ac645.tar.gz
unbound: fix build with gcc-15.0.1
* fix following error: http://errors.yoctoproject.org/Errors/Details/850313/ ../git/compat/malloc.c:9:7: warning: conflicting types for built-in function 'malloc'; expected 'void *(long unsigned int)' [-Wbuiltin-declaration-mismatch] 9 | void *malloc (); | ^~~~~~ ../git/compat/malloc.c:5:1: note: 'malloc' is declared in header '<stdlib.h>' 4 | #include "config.h" +++ |+#include <stdlib.h> 5 | #undef malloc ../git/compat/malloc.c: In function 'rpl_malloc_unbound': ../git/compat/malloc.c:23:10: error: too many arguments to function 'malloc'; expected 0, have 1 23 | return malloc (n); | ^~~~~~ ~ ../git/compat/malloc.c:9:7: note: declared here 9 | void *malloc (); | ^~~~~~ * Seeing that there is '#undef malloc', it appears they don't want to use the malloc from stdlib.h. Therefore, we need to correctly define the parameters for malloc. Signed-off-by: mark.yang <mark.yang@lge.com> Signed-off-by: Khem Raj <raj.khem@gmail.com>
Diffstat (limited to 'meta-networking')
-rw-r--r--meta-networking/recipes-support/unbound/unbound/0001-fix-build-with-gcc-15-Wbuiltin-declaration-mismatch-.patch44
-rw-r--r--meta-networking/recipes-support/unbound/unbound_1.22.0.bb1
2 files changed, 45 insertions, 0 deletions
diff --git a/meta-networking/recipes-support/unbound/unbound/0001-fix-build-with-gcc-15-Wbuiltin-declaration-mismatch-.patch b/meta-networking/recipes-support/unbound/unbound/0001-fix-build-with-gcc-15-Wbuiltin-declaration-mismatch-.patch
new file mode 100644
index 0000000000..70a41f7e37
--- /dev/null
+++ b/meta-networking/recipes-support/unbound/unbound/0001-fix-build-with-gcc-15-Wbuiltin-declaration-mismatch-.patch
@@ -0,0 +1,44 @@
1From 1c58ce07919c36e6a11eead67bd6d14cc22acaec Mon Sep 17 00:00:00 2001
2From: "mark.yang" <mark.yang@lge.com>
3Date: Wed, 2 Apr 2025 15:25:42 +0900
4Subject: [PATCH] fix build with gcc-15 -Wbuiltin-declaration-mismatch error
5
6See more details: http://errors.yoctoproject.org/Errors/Details/850313
7../git/compat/malloc.c:9:7: warning: conflicting types for built-in function 'malloc'; expected 'void *(long unsigned int)' [-Wbuiltin-declaration-mismatch]
8 9 | void *malloc ();
9 | ^~~~~~
10../git/compat/malloc.c:5:1: note: 'malloc' is declared in header '<stdlib.h>'
11 4 | #include "config.h"
12 +++ |+#include <stdlib.h>
13 5 | #undef malloc
14../git/compat/malloc.c: In function 'rpl_malloc_unbound':
15../git/compat/malloc.c:23:10: error: too many arguments to function 'malloc'; expected 0, have 1
16 23 | return malloc (n);
17 | ^~~~~~ ~
18../git/compat/malloc.c:9:7: note: declared here
19 9 | void *malloc ();
20 | ^~~~~~
21
22* Seeing that there is '#undef malloc', it appears they don't want to
23 use the malloc from stdlib.h.
24 Therefore, we need to correctly define the parameters for malloc.
25
26Upstream-Status: Submitted [https://github.com/NLnetLabs/unbound/pull/1262]
27Signed-off-by: mark.yang <mark.yang@lge.com>
28---
29 compat/malloc.c | 2 +-
30 1 file changed, 1 insertion(+), 1 deletion(-)
31
32diff --git a/compat/malloc.c b/compat/malloc.c
33index d8097b13e..af9dcf134 100644
34--- a/compat/malloc.c
35+++ b/compat/malloc.c
36@@ -6,7 +6,7 @@
37 #include <sys/types.h>
38
39 #ifndef USE_WINSOCK
40-void *malloc ();
41+void *malloc (size_t n);
42 #else
43 /* provide a prototype */
44 void *malloc (size_t n);
diff --git a/meta-networking/recipes-support/unbound/unbound_1.22.0.bb b/meta-networking/recipes-support/unbound/unbound_1.22.0.bb
index 2f0c92dd9f..c434ca181f 100644
--- a/meta-networking/recipes-support/unbound/unbound_1.22.0.bb
+++ b/meta-networking/recipes-support/unbound/unbound_1.22.0.bb
@@ -11,6 +11,7 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=5308494bc0590c0cb036afd781d78f06"
11 11
12SRC_URI = "git://github.com/NLnetLabs/unbound.git;protocol=https;branch=master \ 12SRC_URI = "git://github.com/NLnetLabs/unbound.git;protocol=https;branch=master \
13 file://run-ptest \ 13 file://run-ptest \
14 file://0001-fix-build-with-gcc-15-Wbuiltin-declaration-mismatch-.patch \
14 " 15 "
15 16
16# 17 commits after 1.22.0 tag: 17# 17 commits after 1.22.0 tag: