mdns: Fix build with gcc-15

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 <tho3.nguyen@lge.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
This commit is contained in:
Nguyen Dat Tho 2025-04-09 18:14:36 +09:00 committed by Khem Raj
parent 058a9ee791
commit 7be42e05de
No known key found for this signature in database
GPG Key ID: BB053355919D3314
2 changed files with 38 additions and 0 deletions

View File

@ -0,0 +1,37 @@
From 189f0d8e9913f4eaca9189f710155ffba9035f7e Mon Sep 17 00:00:00 2001
From: Nguyen Dat Tho <tho3.nguyen@lge.com>
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 <tho3.nguyen@lge.com>
---
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

View File

@ -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"