diff options
author | 2020-03-30 09:24:26 +0900 | |
---|---|---|
committer | 2020-03-30 09:24:26 +0900 | |
commit | 5b80bfd7bffd4c20d80b7c70a7130529e9a755dd (patch) | |
tree | b4bb18dcd1487dbf1ea8127e5671b7bb2eded033 /external/meta-openembedded/meta-networking/recipes-support/nis/ypbind-mt | |
parent | 706ad73eb02caf8532deaf5d38995bd258725cb8 (diff) |
agl-basesystem
Diffstat (limited to 'external/meta-openembedded/meta-networking/recipes-support/nis/ypbind-mt')
2 files changed, 81 insertions, 0 deletions
diff --git a/external/meta-openembedded/meta-networking/recipes-support/nis/ypbind-mt/0001-dns_hosts-Fix-build-with-musl.patch b/external/meta-openembedded/meta-networking/recipes-support/nis/ypbind-mt/0001-dns_hosts-Fix-build-with-musl.patch new file mode 100644 index 00000000..643b0a94 --- /dev/null +++ b/external/meta-openembedded/meta-networking/recipes-support/nis/ypbind-mt/0001-dns_hosts-Fix-build-with-musl.patch @@ -0,0 +1,67 @@ +From 5452961750275b1e3f7c95e9528338f0ee0357ad Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Thu, 14 Sep 2017 09:17:35 -0700 +Subject: [PATCH] dns_hosts: Fix build with musl + +Add NETDB_* defines which are not available in musl +remove need for sys/cdefs.h by remove __P +Add _GNU_SOURCE for missing u_char definition + +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- +Upstream-Status: Pending + + lib/Makefile.am | 2 +- + lib/dns_hosts.c | 9 ++++++++- + 2 files changed, 9 insertions(+), 2 deletions(-) + +diff --git a/lib/Makefile.am b/lib/Makefile.am +index 977a8db..35cb5b3 100644 +--- a/lib/Makefile.am ++++ b/lib/Makefile.am +@@ -8,7 +8,7 @@ + noinst_LIBRARIES = libcompat.a + noinst_HEADERS = ypbind3_binding.h + +-AM_CFLAGS = -D_REENTRANT=1 @WARNFLAGS@ ++AM_CFLAGS = -D_GNU_SOURCE -D_REENTRANT=1 @WARNFLAGS@ + AM_CPPFLAGS = -I$(srcdir) @TIRPC_CFLAGS@ @NSL_CFLAGS@ -DLOCALEDIR=\"$(localedir)\" + + libcompat_a_SOURCES = dns_hosts.c res_options.h ypbind3_binding_dup.c \ +diff --git a/lib/dns_hosts.c b/lib/dns_hosts.c +index fd421fd..6067879 100644 +--- a/lib/dns_hosts.c ++++ b/lib/dns_hosts.c +@@ -64,6 +64,7 @@ + + #include <sys/param.h> + #include <sys/socket.h> ++#include <sys/types.h> + #include <netinet/in.h> + #include <arpa/inet.h> + #include <arpa/nameser.h> +@@ -84,6 +85,12 @@ extern struct hostent *_gethtbyaddr(const char *, int, int); + #ifndef LOG_AUTH + # define LOG_AUTH 0 + #endif ++#ifndef NETDB_SUCCESS ++# define NETDB_SUCCESS 0 ++#endif ++#ifndef NETDB_INTERNAL ++# define NETDB_INTERNAL -1 ++#endif + + #define MULTI_PTRS_ARE_ALIASES 1 /* XXX - experimental */ + +@@ -101,7 +108,7 @@ static char hostbuf[8*1024]; + static struct in_addr host_addr; + + #ifdef RESOLVSORT +-static void addrsort __P((char **, int)); ++static void addrsort (char **, int); + #endif + + #if PACKETSZ > 1024 +-- +2.14.1 + diff --git a/external/meta-openembedded/meta-networking/recipes-support/nis/ypbind-mt/ypbind.service b/external/meta-openembedded/meta-networking/recipes-support/nis/ypbind-mt/ypbind.service new file mode 100644 index 00000000..1f8df42a --- /dev/null +++ b/external/meta-openembedded/meta-networking/recipes-support/nis/ypbind-mt/ypbind.service @@ -0,0 +1,14 @@ +[Unit] +Description=YP Bind +Requires=domainname.service +After=domainname.service network.target +Before=systemd-user-sessions.service + +[Service] +Type=forking +PIDFile=/var/run/ypbind.pid +ExecStart=/usr/sbin/ypbind + +[Install] +WantedBy=multi-user.target + |