summaryrefslogtreecommitdiffstats
path: root/meta-networking/recipes-support
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2017-09-14 09:22:55 -0700
committerJoe MacDonald <joe_macdonald@mentor.com>2017-09-22 14:37:18 -0400
commita02204eadeaffaeb9137c7b2af181f25ad5fe576 (patch)
treef127f4ba11ada82137b6df44e6944dedb0d2744c /meta-networking/recipes-support
parent001eaa5844c0776936d329928f5b93839b9e600d (diff)
downloadmeta-openembedded-a02204eadeaffaeb9137c7b2af181f25ad5fe576.tar.gz
ypbind-mt: Upgrade to 2.4
Fix build with musl along the way Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com>
Diffstat (limited to 'meta-networking/recipes-support')
-rw-r--r--meta-networking/recipes-support/nis/ypbind-mt/0001-dns_hosts-Fix-build-with-musl.patch67
-rw-r--r--meta-networking/recipes-support/nis/ypbind-mt_2.4.bb (renamed from meta-networking/recipes-support/nis/ypbind-mt_1.38.bb)10
2 files changed, 74 insertions, 3 deletions
diff --git a/meta-networking/recipes-support/nis/ypbind-mt/0001-dns_hosts-Fix-build-with-musl.patch b/meta-networking/recipes-support/nis/ypbind-mt/0001-dns_hosts-Fix-build-with-musl.patch
new file mode 100644
index 000000000..643b0a940
--- /dev/null
+++ b/meta-networking/recipes-support/nis/ypbind-mt/0001-dns_hosts-Fix-build-with-musl.patch
@@ -0,0 +1,67 @@
1From 5452961750275b1e3f7c95e9528338f0ee0357ad Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Thu, 14 Sep 2017 09:17:35 -0700
4Subject: [PATCH] dns_hosts: Fix build with musl
5
6Add NETDB_* defines which are not available in musl
7remove need for sys/cdefs.h by remove __P
8Add _GNU_SOURCE for missing u_char definition
9
10Signed-off-by: Khem Raj <raj.khem@gmail.com>
11---
12Upstream-Status: Pending
13
14 lib/Makefile.am | 2 +-
15 lib/dns_hosts.c | 9 ++++++++-
16 2 files changed, 9 insertions(+), 2 deletions(-)
17
18diff --git a/lib/Makefile.am b/lib/Makefile.am
19index 977a8db..35cb5b3 100644
20--- a/lib/Makefile.am
21+++ b/lib/Makefile.am
22@@ -8,7 +8,7 @@
23 noinst_LIBRARIES = libcompat.a
24 noinst_HEADERS = ypbind3_binding.h
25
26-AM_CFLAGS = -D_REENTRANT=1 @WARNFLAGS@
27+AM_CFLAGS = -D_GNU_SOURCE -D_REENTRANT=1 @WARNFLAGS@
28 AM_CPPFLAGS = -I$(srcdir) @TIRPC_CFLAGS@ @NSL_CFLAGS@ -DLOCALEDIR=\"$(localedir)\"
29
30 libcompat_a_SOURCES = dns_hosts.c res_options.h ypbind3_binding_dup.c \
31diff --git a/lib/dns_hosts.c b/lib/dns_hosts.c
32index fd421fd..6067879 100644
33--- a/lib/dns_hosts.c
34+++ b/lib/dns_hosts.c
35@@ -64,6 +64,7 @@
36
37 #include <sys/param.h>
38 #include <sys/socket.h>
39+#include <sys/types.h>
40 #include <netinet/in.h>
41 #include <arpa/inet.h>
42 #include <arpa/nameser.h>
43@@ -84,6 +85,12 @@ extern struct hostent *_gethtbyaddr(const char *, int, int);
44 #ifndef LOG_AUTH
45 # define LOG_AUTH 0
46 #endif
47+#ifndef NETDB_SUCCESS
48+# define NETDB_SUCCESS 0
49+#endif
50+#ifndef NETDB_INTERNAL
51+# define NETDB_INTERNAL -1
52+#endif
53
54 #define MULTI_PTRS_ARE_ALIASES 1 /* XXX - experimental */
55
56@@ -101,7 +108,7 @@ static char hostbuf[8*1024];
57 static struct in_addr host_addr;
58
59 #ifdef RESOLVSORT
60-static void addrsort __P((char **, int));
61+static void addrsort (char **, int);
62 #endif
63
64 #if PACKETSZ > 1024
65--
662.14.1
67
diff --git a/meta-networking/recipes-support/nis/ypbind-mt_1.38.bb b/meta-networking/recipes-support/nis/ypbind-mt_2.4.bb
index b9c0aa700..9822f455e 100644
--- a/meta-networking/recipes-support/nis/ypbind-mt_1.38.bb
+++ b/meta-networking/recipes-support/nis/ypbind-mt_2.4.bb
@@ -21,6 +21,7 @@ DEPENDS = " \
21 yp-tools \ 21 yp-tools \
22 ${@bb.utils.filter('DISTRO_FEATURES', 'systemd', d)} \ 22 ${@bb.utils.filter('DISTRO_FEATURES', 'systemd', d)} \
23 " 23 "
24DEPENDS_append_libc-musl = " bsd-headers nss"
24RDEPENDS_${PN} += "yp-tools" 25RDEPENDS_${PN} += "yp-tools"
25 26
26# ypbind-mt now provides all the functionality of ypbind 27# ypbind-mt now provides all the functionality of ypbind
@@ -30,9 +31,10 @@ PROVIDES += "ypbind"
30SRC_URI = "http://www.linux-nis.org/download/ypbind-mt/${BP}.tar.bz2 \ 31SRC_URI = "http://www.linux-nis.org/download/ypbind-mt/${BP}.tar.bz2 \
31 file://ypbind.init \ 32 file://ypbind.init \
32 file://ypbind.service \ 33 file://ypbind.service \
33" 34 file://0001-dns_hosts-Fix-build-with-musl.patch \
34SRC_URI[md5sum] = "094088c0e282fa7f3b3dd6cc51d0a4e1" 35 "
35SRC_URI[sha256sum] = "1930ce19f6ccfe10400f3497b31867f71690d2bcd3f5b575199fa915559b7746" 36SRC_URI[md5sum] = "1aeccd0d11c064d5d59c56941bca682b"
37SRC_URI[sha256sum] = "a2e1fa8fc992a12b289c229e00e38c20d59070c3bcf08babf40c692515c340e0"
36 38
37inherit systemd update-rc.d 39inherit systemd update-rc.d
38 40
@@ -42,6 +44,8 @@ INITSCRIPT_PARAMS = "start 44 3 5 . stop 70 0 1 2 6 ."
42 44
43CACHED_CONFIGUREVARS = "ac_cv_prog_STRIP=/bin/true" 45CACHED_CONFIGUREVARS = "ac_cv_prog_STRIP=/bin/true"
44 46
47CFLAGS_append_libc-musl = " -I${STAGING_INCDIR}/nss3"
48
45do_install_append () { 49do_install_append () {
46 install -d ${D}${sysconfdir}/init.d 50 install -d ${D}${sysconfdir}/init.d
47 install -d ${D}${sysconfdir}/rcS.d 51 install -d ${D}${sysconfdir}/rcS.d