summaryrefslogtreecommitdiffstats
path: root/meta-networking
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2018-02-05 23:46:14 -0800
committerArmin Kuster <akuster808@gmail.com>2018-03-12 10:02:03 -0700
commitda1ec818c14a8986db35f0163a09415567f74cae (patch)
treebbdb95dfe1d3ddedd8fa07f04c9b4b8aa31587c1 /meta-networking
parentce32d1dc4ca40f0e7a4a2644d5dd364b4827b2dd (diff)
downloadmeta-openembedded-da1ec818c14a8986db35f0163a09415567f74cae.tar.gz
mdns: Do not include nss.h with musl
Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Armin Kuster <akuster808@gmail.com>
Diffstat (limited to 'meta-networking')
-rw-r--r--meta-networking/recipes-protocols/mdns/files/0001-nss_mdns-Do-not-include-nss.h-when-libc-glibc.patch42
-rw-r--r--meta-networking/recipes-protocols/mdns/mdns_765.50.9.bb1
2 files changed, 43 insertions, 0 deletions
diff --git a/meta-networking/recipes-protocols/mdns/files/0001-nss_mdns-Do-not-include-nss.h-when-libc-glibc.patch b/meta-networking/recipes-protocols/mdns/files/0001-nss_mdns-Do-not-include-nss.h-when-libc-glibc.patch
new file mode 100644
index 000000000..863866d18
--- /dev/null
+++ b/meta-networking/recipes-protocols/mdns/files/0001-nss_mdns-Do-not-include-nss.h-when-libc-glibc.patch
@@ -0,0 +1,42 @@
1From d3082d2c606c810aa0a39378bf1e02575af3a301 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Fri, 2 Feb 2018 21:54:11 -0800
4Subject: [PATCH] nss_mdns: Do not include nss.h when libc != glibc
5
6Provide nss_status macro instead for non-glibc case
7where nss.h is absent
8
9Upstream-Status: Pending
10Signed-off-by: Khem Raj <raj.khem@gmail.com>
11---
12 mDNSPosix/nss_mdns.c | 13 ++++++++++++-
13 1 file changed, 12 insertions(+), 1 deletion(-)
14
15diff --git a/mDNSPosix/nss_mdns.c b/mDNSPosix/nss_mdns.c
16index afadb3c..c469584 100755
17--- a/mDNSPosix/nss_mdns.c
18+++ b/mDNSPosix/nss_mdns.c
19@@ -378,8 +378,19 @@ init_config ();
20
21 #define ENTNAME hostent
22 #define DATABASE "hosts"
23-
24+#ifdef __GLIBC__
25 #include <nss.h>
26+#else
27+enum nss_status
28+{
29+ NSS_STATUS_TRYAGAIN = -2,
30+ NSS_STATUS_UNAVAIL,
31+ NSS_STATUS_NOTFOUND,
32+ NSS_STATUS_SUCCESS,
33+ NSS_STATUS_RETURN
34+};
35+#define NETDB_INTERNAL NULL
36+#endif
37 // For nss_status
38 #include <netdb.h>
39 // For hostent
40--
412.16.1
42
diff --git a/meta-networking/recipes-protocols/mdns/mdns_765.50.9.bb b/meta-networking/recipes-protocols/mdns/mdns_765.50.9.bb
index 1a80f7acb..9a7152fcf 100644
--- a/meta-networking/recipes-protocols/mdns/mdns_765.50.9.bb
+++ b/meta-networking/recipes-protocols/mdns/mdns_765.50.9.bb
@@ -9,6 +9,7 @@ RPROVIDES_${PN} += "libdns_sd.so"
9SRC_URI = "http://opensource.apple.com/tarballs/mDNSResponder/mDNSResponder-${PV}.tar.gz \ 9SRC_URI = "http://opensource.apple.com/tarballs/mDNSResponder/mDNSResponder-${PV}.tar.gz \
10 file://build.patch;patchdir=.. \ 10 file://build.patch;patchdir=.. \
11 file://mdns.service \ 11 file://mdns.service \
12 file://0001-nss_mdns-Do-not-include-nss.h-when-libc-glibc.patch;patchdir=.. \
12 " 13 "
13 14
14SRC_URI[md5sum] = "4a6bc1628851002634ea3833a4dca317" 15SRC_URI[md5sum] = "4a6bc1628851002634ea3833a4dca317"