summaryrefslogtreecommitdiffstats
path: root/meta/recipes-connectivity
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2016-02-01 05:08:22 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-02-02 14:44:16 +0000
commit07a91a6e31b777c97704e1b031bda2665bb8bc2d (patch)
treebc98a1a26146201d29b827dbd421b679b02f218b /meta/recipes-connectivity
parent1b34f55a35111b4b798469a819be54d31927e13f (diff)
downloadpoky-07a91a6e31b777c97704e1b031bda2665bb8bc2d.tar.gz
libnss-mdns: Check for nss.h before using
nss.h is not available on all libcs so check for it and if its not there provide the needed data types. Fixed buil with musl ../../nss-mdns-0.10/src/nss.c:32:17: fatal error: nss.h: No such file or directory compilation terminated. make[2]: *** [libnss_mdns4_la-nss.lo] Error 1 (From OE-Core rev: 94f780e889f194b67a48587ac68b3200288bee10) Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-connectivity')
-rw-r--r--meta/recipes-connectivity/libnss-mdns/libnss-mdns/0001-check-for-nss.h.patch56
-rw-r--r--meta/recipes-connectivity/libnss-mdns/libnss-mdns_0.10.bb4
2 files changed, 59 insertions, 1 deletions
diff --git a/meta/recipes-connectivity/libnss-mdns/libnss-mdns/0001-check-for-nss.h.patch b/meta/recipes-connectivity/libnss-mdns/libnss-mdns/0001-check-for-nss.h.patch
new file mode 100644
index 0000000000..f63eb90cdc
--- /dev/null
+++ b/meta/recipes-connectivity/libnss-mdns/libnss-mdns/0001-check-for-nss.h.patch
@@ -0,0 +1,56 @@
1From bdf01a581d58eb5340e9238d143dbcac9db5b11c Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Sat, 30 Jan 2016 19:29:45 +0000
4Subject: [PATCH] check for nss.h
5
6nss.h may not available on all libc implementations, e.g. musl does not
7have this header, this patch detects nss.h presence and defines the data
8types that are required if nss.h is missing on platform
9
10Signed-off-by: Khem Raj <raj.khem@gmail.com>
11---
12Upstream-Status: Pending
13
14 configure.ac | 2 +-
15 src/nss.c | 11 +++++++++++
16 2 files changed, 12 insertions(+), 1 deletion(-)
17
18diff --git a/configure.ac b/configure.ac
19index aa66bc6..ce19b07 100644
20--- a/configure.ac
21+++ b/configure.ac
22@@ -71,7 +71,7 @@ AC_PROG_LIBTOOL
23
24 # Checks for header files.
25 AC_HEADER_STDC
26-AC_CHECK_HEADERS([arpa/inet.h fcntl.h inttypes.h netdb.h netinet/in.h stdlib.h string.h sys/socket.h sys/time.h unistd.h nss.h sys/ioctl.h])
27+AC_CHECK_HEADERS([arpa/inet.h fcntl.h inttypes.h netdb.h netinet/in.h stdlib.h string.h sys/socket.h sys/time.h unistd.h nss.h sys/ioctl.h nss.h])
28
29 # Checks for typedefs, structures, and compiler characteristics.
30 AC_C_CONST
31diff --git a/src/nss.c b/src/nss.c
32index e48e315..406733b 100644
33--- a/src/nss.c
34+++ b/src/nss.c
35@@ -29,7 +29,18 @@
36 #include <assert.h>
37 #include <netdb.h>
38 #include <sys/socket.h>
39+#ifdef HAVE_NSS_H
40 #include <nss.h>
41+#else
42+enum nss_status {
43+ NSS_STATUS_TRYAGAIN = -2,
44+ NSS_STATUS_UNAVAIL,
45+ NSS_STATUS_NOTFOUND,
46+ NSS_STATUS_SUCCESS,
47+ NSS_STATUS_RETURN
48+};
49+#endif
50+
51 #include <stdio.h>
52 #include <stdlib.h>
53
54--
552.7.0
56
diff --git a/meta/recipes-connectivity/libnss-mdns/libnss-mdns_0.10.bb b/meta/recipes-connectivity/libnss-mdns/libnss-mdns_0.10.bb
index 0b936ef092..8d2feec769 100644
--- a/meta/recipes-connectivity/libnss-mdns/libnss-mdns_0.10.bb
+++ b/meta/recipes-connectivity/libnss-mdns/libnss-mdns_0.10.bb
@@ -8,7 +8,9 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=2d5025d4aa3495befef8f17206a5b0a1"
8DEPENDS = "avahi" 8DEPENDS = "avahi"
9PR = "r7" 9PR = "r7"
10 10
11SRC_URI = "http://0pointer.de/lennart/projects/nss-mdns/nss-mdns-${PV}.tar.gz" 11SRC_URI = "http://0pointer.de/lennart/projects/nss-mdns/nss-mdns-${PV}.tar.gz \
12 file://0001-check-for-nss.h.patch \
13 "
12 14
13SRC_URI[md5sum] = "03938f17646efbb50aa70ba5f99f51d7" 15SRC_URI[md5sum] = "03938f17646efbb50aa70ba5f99f51d7"
14SRC_URI[sha256sum] = "1e683c2e7c3921814706d62fbbd3e9cbf493a75fa00255e0e715508d8134fa6d" 16SRC_URI[sha256sum] = "1e683c2e7c3921814706d62fbbd3e9cbf493a75fa00255e0e715508d8134fa6d"