mdns: Fix build with gcc-15
PATCH 1/1 mdns: Fix build with gcc-15
From: Nguyen Dat Tho <[email protected]>
Fix error: http://errors.yoctoproject.org/Errors/Details/851809/
../mDNSShared/CommonServices.h:856:13: error: 'bool' cannot be defined via 'typedef'
856 | typedef int bool;
| ^~~~
../mDNSShared/CommonServices.h:856:13: note: 'bool' is a keyword with '-std=c23' onwards
../mDNSShared/CommonServices.h:856:1: warning: useless type name in empty declaration
856 | typedef int bool;
| ^~~~~~~Signed-off-by Nguyen Dat Tho <[email protected]>
--- .../mdns/0001-Fix-build-with-gcc-15.patch | 37 +++++++++++++++++++ .../recipes-protocols/mdns/mdns_2559.80.8.bb | 1 + 2 files changed, 38 insertions(+) create mode 100644 meta-networking/recipes-protocols/mdns/mdns/0001-Fix-build-with-gcc-15.patch
meta-networking/recipes-protocols/mdns/mdns/0001-Fix-build-with-gcc-15.patch new file +37 -0
@@ -0,0 +1,37 @@ +From 189f0d8e9913f4eaca9189f710155ffba9035f7e Mon Sep 17 00:00:00 2001 +From: Nguyen Dat Tho <[email protected]> +Date: Wed, 9 Apr 2025 13:05:24 +0900 +Subject: [PATCH] Fix build with gcc-15 + +To fix error: +In file included from ../mDNSCore/mDNS.c:76: +../mDNSShared/CommonServices.h:856:13: error: 'bool' cannot be defined via 'typedef' + 856 | typedef int bool; + | ^~~~ +../mDNSShared/CommonServices.h:856:13: note: 'bool' is a keyword with '-std=c23' onwards +../mDNSShared/CommonServices.h:856:1: warning: useless type name in empty declaration + +Upstream-Status: Pending (An owner of this repository has limited the ability to open a pull request to users that are collaborators on this repository.) + +Signed-off-by: Nguyen Dat Tho <[email protected]> +--- + mDNSShared/CommonServices.h | 3 +++ + 1 file changed, 3 insertions(+) + +diff --git a/mDNSShared/CommonServices.h b/mDNSShared/CommonServices.h +index 7efb077..f0f3a8b 100644 +--- a/mDNSShared/CommonServices.h ++++ b/mDNSShared/CommonServices.h +@@ -192,6 +192,9 @@ extern "C" { + + #include <stdint.h> + #include <arpa/inet.h> ++#if defined __STDC__ && defined __STDC_VERSION__ && __STDC_VERSION__ >= 199901L ++ #include <stdbool.h> ++#endif + + #elif ( TARGET_OS_SOLARIS ) + +-- +2.34.1 +
meta-networking/recipes-protocols/mdns/mdns_2559.80.8.bb +1 -0
@@ -26,6 +26,7 @@ SRC_URI = "git://github.com/apple-oss-distributions/mDNSResponder;protocol=https file://0001-Fix-SIGSEGV-during-DumpStateLog.patch \ file://0005-Fix-missing-limit-declarations.patch \ file://0004-Add-definition-for-MAX.patch \ + file://0001-Fix-build-with-gcc-15.patch \ " BRANCH = "rel/mDNSResponder-2559" SRCREV = "ecc02274878b0a70dba229de642b081cd1c30927"
Signature · 1 line
2.34.1