From d04f3c9bfe62a9f77f64a49f9b54551827e5f192 Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Thu, 4 Nov 2021 07:40:35 -0700 Subject: [PATCH] mdns: Upgrade to 1310.140.1 Fix build with musl while here Signed-off-by: Khem Raj --- .../0001-dns-sd-Include-missing-headers.patch | 41 +++++++++++++++++++ ...{mdns_1310.40.42.bb => mdns_1310.140.1.bb} | 6 +-- 2 files changed, 44 insertions(+), 3 deletions(-) create mode 100644 meta-networking/recipes-protocols/mdns/files/0001-dns-sd-Include-missing-headers.patch rename meta-networking/recipes-protocols/mdns/{mdns_1310.40.42.bb => mdns_1310.140.1.bb} (95%) diff --git a/meta-networking/recipes-protocols/mdns/files/0001-dns-sd-Include-missing-headers.patch b/meta-networking/recipes-protocols/mdns/files/0001-dns-sd-Include-missing-headers.patch new file mode 100644 index 0000000000..c743b3eddb --- /dev/null +++ b/meta-networking/recipes-protocols/mdns/files/0001-dns-sd-Include-missing-headers.patch @@ -0,0 +1,41 @@ +From ea442b57f7a9bcd41d5b5bd1cafde4dbe5685d41 Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Thu, 4 Nov 2021 07:31:32 -0700 +Subject: [PATCH] dns-sd: Include missing headers + +Fixes build on Musl + +Upstream-Status: Pending +Signed-off-by: Khem Raj +--- + Clients/dns-sd.c | 2 ++ + 1 file changed, 2 insertions(+) + +--- a/Clients/dns-sd.c ++++ b/Clients/dns-sd.c +@@ -58,11 +58,13 @@ + //#define TEST_NEW_CLIENTSTUB 1 + + #include ++#include // For va_args + #include // For stdout, stderr + #include // For exit() + #include // For strlen(), strcpy() + #include // For errno, EINTR + #include ++#include // For MIN + #include // For u_char + #ifdef APPLE_OSX_mDNSResponder + #include // For PRId64 +--- a/mDNSPosix/nss_mdns.c ++++ b/mDNSPosix/nss_mdns.c +@@ -89,6 +89,9 @@ + + #include + ++#if !defined(NETDB_INTERNAL) ++# define NETDB_INTERNAL (-1) ++#endif + + //---------- + // Public functions diff --git a/meta-networking/recipes-protocols/mdns/mdns_1310.40.42.bb b/meta-networking/recipes-protocols/mdns/mdns_1310.140.1.bb similarity index 95% rename from meta-networking/recipes-protocols/mdns/mdns_1310.40.42.bb rename to meta-networking/recipes-protocols/mdns/mdns_1310.140.1.bb index c9bfef2d14..5c6d220200 100644 --- a/meta-networking/recipes-protocols/mdns/mdns_1310.40.42.bb +++ b/meta-networking/recipes-protocols/mdns/mdns_1310.140.1.bb @@ -4,7 +4,7 @@ HOMEPAGE = "http://developer.apple.com/networking/bonjour/" LICENSE = "Apache-2.0 & BSD-3-Clause" LIC_FILES_CHKSUM = "file://../LICENSE;md5=31c50371921e0fb731003bbc665f29bf" -COMPATIBLE_HOST:libc-musl = 'null' +DEPENDS:append:libc-musl = " musl-nscd" RPROVIDES:${PN} += "libdns_sd.so" @@ -21,9 +21,9 @@ SRC_URI = "https://opensource.apple.com/tarballs/mDNSResponder/mDNSResponder-${P file://0009-Fix-possible-NULL-dereference.patch;patchdir=.. \ file://0010-Handle-errors-from-socket-calls.patch;patchdir=.. \ file://0011-Change-a-dynamic-allocation-to-file-scope-variable.patch;patchdir=.. \ + file://0001-dns-sd-Include-missing-headers.patch;patchdir=.. \ " -SRC_URI[md5sum] = "dfcfd4d7f29a56ec99e7df1d21db5e7b" -SRC_URI[sha256sum] = "bea29e1616cd56ccb8f88c0fad2bcdc4031f4deb2d899c793e2f27a8384f0b34" +SRC_URI[sha256sum] = "040f6495c18b9f0557bcf9e00cbcfc82b03405f5ba6963dc147730ca0ca90d6f" CVE_PRODUCT = "apple:mdnsresponder"