summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--meta-networking/recipes-support/nis/yp-tools/0001-lib-yp_all_host.c-Fix-build-with-gcc-7.patch33
-rw-r--r--meta-networking/recipes-support/nis/yp-tools/0001-ypbind3_binding_dup.c-Include-string.h-for-strdup-de.patch28
-rw-r--r--meta-networking/recipes-support/nis/yp-tools/0002-yp_dump_bindings.c-Include-string.h-for-memset.patch30
-rw-r--r--meta-networking/recipes-support/nis/yp-tools/alignment-cheat.patch52
-rw-r--r--meta-networking/recipes-support/nis/yp-tools/yp-tools-ipv4-ipv6-Provide-an-in-place-version-of-mapv4v6addr.patch110
-rw-r--r--meta-networking/recipes-support/nis/yp-tools_4.2.2.bb (renamed from meta-networking/recipes-support/nis/yp-tools_3.3.bb)16
6 files changed, 65 insertions, 204 deletions
diff --git a/meta-networking/recipes-support/nis/yp-tools/0001-lib-yp_all_host.c-Fix-build-with-gcc-7.patch b/meta-networking/recipes-support/nis/yp-tools/0001-lib-yp_all_host.c-Fix-build-with-gcc-7.patch
deleted file mode 100644
index d1d5f9ca7..000000000
--- a/meta-networking/recipes-support/nis/yp-tools/0001-lib-yp_all_host.c-Fix-build-with-gcc-7.patch
+++ /dev/null
@@ -1,33 +0,0 @@
1From 71fdfdfcea2bfa5f522512366bfcdf95f861ecc6 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Sun, 23 Apr 2017 23:44:37 -0700
4Subject: [PATCH] lib/yp_all_host.c: Fix build with gcc 7
5
6fixes
7
8| ../../../../../../../workspace/sources/yp-tools/lib/yp_all_host.c: In function 'yp_all_host':
9| ../../../../../../../workspace/sources/yp-tools/lib/yp_all_host.c:109:30: error: comparison between pointer and zero character constant [-Werror=pointer-compare]
10| inmap == NULL || inmap == '\0')
11| ^~
12
13Signed-off-by: Khem Raj <raj.khem@gmail.com>
14---
15 lib/yp_all_host.c | 2 +-
16 1 file changed, 1 insertion(+), 1 deletion(-)
17
18diff --git a/lib/yp_all_host.c b/lib/yp_all_host.c
19index 59cf236..4a07a7e 100644
20--- a/lib/yp_all_host.c
21+++ b/lib/yp_all_host.c
22@@ -106,7 +106,7 @@ yp_all_host (const char *indomain, const char *inmap,
23
24 if (hostname == NULL || hostname[0] == '\0' ||
25 indomain == NULL || indomain[0] == '\0' ||
26- inmap == NULL || inmap == '\0')
27+ inmap == NULL || inmap[0] == '\0')
28 return YPERR_BADARGS;
29
30 res = YPERR_YPERR;
31--
322.12.2
33
diff --git a/meta-networking/recipes-support/nis/yp-tools/0001-ypbind3_binding_dup.c-Include-string.h-for-strdup-de.patch b/meta-networking/recipes-support/nis/yp-tools/0001-ypbind3_binding_dup.c-Include-string.h-for-strdup-de.patch
new file mode 100644
index 000000000..3d4d4f278
--- /dev/null
+++ b/meta-networking/recipes-support/nis/yp-tools/0001-ypbind3_binding_dup.c-Include-string.h-for-strdup-de.patch
@@ -0,0 +1,28 @@
1From 420cb6927553bbca5b49b7681cf208e6df6e4d7c Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Fri, 8 Sep 2017 08:42:45 -0700
4Subject: [PATCH 1/2] ypbind3_binding_dup.c: Include string.h for strdup
5 declaration
6
7Signed-off-by: Khem Raj <raj.khem@gmail.com>
8---
9Upstream-Status: Submitted
10
11 lib/ypbind3_binding_dup.c | 1 +
12 1 file changed, 1 insertion(+)
13
14diff --git a/lib/ypbind3_binding_dup.c b/lib/ypbind3_binding_dup.c
15index ce4aadf..8199c0b 100644
16--- a/lib/ypbind3_binding_dup.c
17+++ b/lib/ypbind3_binding_dup.c
18@@ -19,6 +19,7 @@
19
20 #if defined(HAVE_YPBIND3)
21
22+#include <string.h>
23 #include <rpcsvc/yp_prot.h>
24 #include "internal.h"
25
26--
272.14.1
28
diff --git a/meta-networking/recipes-support/nis/yp-tools/0002-yp_dump_bindings.c-Include-string.h-for-memset.patch b/meta-networking/recipes-support/nis/yp-tools/0002-yp_dump_bindings.c-Include-string.h-for-memset.patch
new file mode 100644
index 000000000..0562e58af
--- /dev/null
+++ b/meta-networking/recipes-support/nis/yp-tools/0002-yp_dump_bindings.c-Include-string.h-for-memset.patch
@@ -0,0 +1,30 @@
1From 03ccabb6264c008430c4b1739351df5a63829f8e Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Fri, 8 Sep 2017 08:52:32 -0700
4Subject: [PATCH 2/2] yp_dump_bindings.c: Include string.h for memset
5
6Fixes
7error: implicitly declaring library function 'memset'
8
9Signed-off-by: Khem Raj <raj.khem@gmail.com>
10---
11Upstream-Status: Submitted
12
13 src/yp_dump_binding.c | 1 +
14 1 file changed, 1 insertion(+)
15
16diff --git a/src/yp_dump_binding.c b/src/yp_dump_binding.c
17index a5ab920..d75e2c2 100644
18--- a/src/yp_dump_binding.c
19+++ b/src/yp_dump_binding.c
20@@ -26,6 +26,7 @@
21 #include <libintl.h>
22 #include <locale.h>
23 #include <getopt.h>
24+#include <string.h>
25 #include <sys/stat.h>
26 #include <arpa/inet.h>
27 #include <rpcsvc/ypclnt.h>
28--
292.14.1
30
diff --git a/meta-networking/recipes-support/nis/yp-tools/alignment-cheat.patch b/meta-networking/recipes-support/nis/yp-tools/alignment-cheat.patch
deleted file mode 100644
index be9b62b8c..000000000
--- a/meta-networking/recipes-support/nis/yp-tools/alignment-cheat.patch
+++ /dev/null
@@ -1,52 +0,0 @@
1yp-tools: avoid fatal cast warning
2
3The way casting is done, we will get a fatal alignment warning on some
4architectures. This patch cheats our way around this.
5
6We also eliminate an unused constant which causes a fatal warning.
7
8Upstream-status: Inappropriate [code does not exist in version 4.x]
9
10Signed-off-by: Joe Slater <jslater@windriver.com>
11
12--- a/lib/do_ypcall.c
13+++ b/lib/do_ypcall.c
14@@ -44,7 +44,6 @@ struct dom_binding
15 typedef struct dom_binding dom_binding;
16
17 static const struct timeval RPCTIMEOUT = {25, 0};
18-static const struct timeval UDPTIMEOUT = {5, 0};
19 static int const MAXTRIES = 2;
20 static pthread_mutex_t ypbindlist_lock = PTHREAD_MUTEX_INITIALIZER;
21 static dom_binding *ypbindlist = NULL;
22@@ -381,7 +380,7 @@ __ypclnt_call (u_long prog, xdrproc_t xa
23
24 int
25 do_ypcall (const char *domain, u_long prog, xdrproc_t xargs,
26- caddr_t req, xdrproc_t xres, caddr_t resp)
27+ caddr_t req, xdrproc_t xres, void *resp)
28 {
29 dom_binding *ydb;
30 int status;
31@@ -450,7 +449,7 @@ do_ypcall (const char *domain, u_long pr
32 /* Like do_ypcall, but translate the status value if necessary. */
33 int
34 do_ypcall_tr (const char *domain, u_long prog, xdrproc_t xargs,
35- caddr_t req, xdrproc_t xres, caddr_t resp)
36+ caddr_t req, xdrproc_t xres, void *resp)
37 {
38 int status = do_ypcall (domain, prog, xargs, req, xres, resp);
39 if (status == YPERR_SUCCESS)
40--- a/lib/internal.h
41+++ b/lib/internal.h
42@@ -17,8 +17,8 @@
43 #define _INTERNAL_H_
44
45 extern int do_ypcall (const char *domain, u_long prog, xdrproc_t xargs,
46- caddr_t req, xdrproc_t xres, caddr_t resp);
47+ caddr_t req, xdrproc_t xres, void *resp);
48 extern int do_ypcall_tr (const char *domain, u_long prog, xdrproc_t xargs,
49- caddr_t req, xdrproc_t xres, caddr_t resp);
50+ caddr_t req, xdrproc_t xres, void *resp);
51 extern int yp_maplist (const char *, struct ypmaplist **);
52 #endif
diff --git a/meta-networking/recipes-support/nis/yp-tools/yp-tools-ipv4-ipv6-Provide-an-in-place-version-of-mapv4v6addr.patch b/meta-networking/recipes-support/nis/yp-tools/yp-tools-ipv4-ipv6-Provide-an-in-place-version-of-mapv4v6addr.patch
deleted file mode 100644
index 9ef569f15..000000000
--- a/meta-networking/recipes-support/nis/yp-tools/yp-tools-ipv4-ipv6-Provide-an-in-place-version-of-mapv4v6addr.patch
+++ /dev/null
@@ -1,110 +0,0 @@
1From a1ef10d63b0ea34c788d5432e94c72b00ae55e04 Mon Sep 17 00:00:00 2001
2From: Joe MacDonald <joe_macdonald@mentor.com>
3Date: Fri, 27 Feb 2015 12:04:10 -0500
4Subject: [PATCH] ipv4/ipv6: Provide an in-place version of mapv4v6addr.h
5
6mapv4v6addr.h isn't always available, depending on your build, but
7nis-hosts.c only needs it for a single, inline function. So drop a copy
8here rather than playing games with the include path that would
9potentially lead to cross-compilation issues.
10
11Upstream-status: Inappropriate [embedded specific]
12
13Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com>
14---
15 nss_nis6/mapv4v6addr.h | 69 ++++++++++++++++++++++++++++++++++++++++++++++++++
16 nss_nis6/nis-hosts.c | 2 +-
17 2 files changed, 70 insertions(+), 1 deletion(-)
18 create mode 100644 nss_nis6/mapv4v6addr.h
19
20diff --git a/nss_nis6/mapv4v6addr.h b/nss_nis6/mapv4v6addr.h
21new file mode 100644
22index 0000000..7f85f7d
23--- /dev/null
24+++ b/nss_nis6/mapv4v6addr.h
25@@ -0,0 +1,69 @@
26+/*
27+ * ++Copyright++ 1985, 1988, 1993
28+ * -
29+ * Copyright (c) 1985, 1988, 1993
30+ * The Regents of the University of California. All rights reserved.
31+ *
32+ * Redistribution and use in source and binary forms, with or without
33+ * modification, are permitted provided that the following conditions
34+ * are met:
35+ * 1. Redistributions of source code must retain the above copyright
36+ * notice, this list of conditions and the following disclaimer.
37+ * 2. Redistributions in binary form must reproduce the above copyright
38+ * notice, this list of conditions and the following disclaimer in the
39+ * documentation and/or other materials provided with the distribution.
40+ * 4. Neither the name of the University nor the names of its contributors
41+ * may be used to endorse or promote products derived from this software
42+ * without specific prior written permission.
43+ *
44+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
45+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
46+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
47+ * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
48+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
49+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
50+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
51+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
52+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
53+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
54+ * SUCH DAMAGE.
55+ * -
56+ * Portions Copyright (c) 1993 by Digital Equipment Corporation.
57+ *
58+ * Permission to use, copy, modify, and distribute this software for any
59+ * purpose with or without fee is hereby granted, provided that the above
60+ * copyright notice and this permission notice appear in all copies, and that
61+ * the name of Digital Equipment Corporation not be used in advertising or
62+ * publicity pertaining to distribution of the document or software without
63+ * specific, written prior permission.
64+ *
65+ * THE SOFTWARE IS PROVIDED "AS IS" AND DIGITAL EQUIPMENT CORP. DISCLAIMS ALL
66+ * WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES
67+ * OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL DIGITAL EQUIPMENT
68+ * CORPORATION BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
69+ * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
70+ * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
71+ * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
72+ * SOFTWARE.
73+ * -
74+ * --Copyright--
75+ */
76+
77+#include <string.h>
78+#include <arpa/nameser.h>
79+
80+static void
81+map_v4v6_address (const char *src, char *dst)
82+{
83+ u_char *p = (u_char *) dst;
84+ int i;
85+
86+ /* Move the IPv4 part to the right position. */
87+ memcpy (dst + 12, src, INADDRSZ);
88+
89+ /* Mark this ipv6 addr as a mapped ipv4. */
90+ for (i = 0; i < 10; i++)
91+ *p++ = 0x00;
92+ *p++ = 0xff;
93+ *p = 0xff;
94+}
95diff --git a/nss_nis6/nis-hosts.c b/nss_nis6/nis-hosts.c
96index af99c74..96d8fa1 100644
97--- a/nss_nis6/nis-hosts.c
98+++ b/nss_nis6/nis-hosts.c
99@@ -36,7 +36,7 @@
100 #include "nss-nis6.h"
101
102 /* Get implementation for some internal functions. */
103-#include <resolv/mapv4v6addr.h>
104+#include "mapv4v6addr.h"
105
106 #define ENTNAME hostent
107 #define DATABASE "hosts"
108--
1091.9.1
110
diff --git a/meta-networking/recipes-support/nis/yp-tools_3.3.bb b/meta-networking/recipes-support/nis/yp-tools_4.2.2.bb
index 7bd4630f7..a3f0a7698 100644
--- a/meta-networking/recipes-support/nis/yp-tools_3.3.bb
+++ b/meta-networking/recipes-support/nis/yp-tools_4.2.2.bb
@@ -13,14 +13,13 @@ and ypdomainname. \
13 13
14SRC_URI = "http://www.linux-nis.org/download/yp-tools/${BP}.tar.bz2 \ 14SRC_URI = "http://www.linux-nis.org/download/yp-tools/${BP}.tar.bz2 \
15 file://domainname.service \ 15 file://domainname.service \
16 file://yp-tools-ipv4-ipv6-Provide-an-in-place-version-of-mapv4v6addr.patch \ 16 file://0001-ypbind3_binding_dup.c-Include-string.h-for-strdup-de.patch \
17 file://alignment-cheat.patch \ 17 file://0002-yp_dump_bindings.c-Include-string.h-for-memset.patch \
18 file://0001-lib-yp_all_host.c-Fix-build-with-gcc-7.patch \
19 " 18 "
20SRC_URI[md5sum] = "acebeecc11a73fb8097503670344834c" 19SRC_URI[md5sum] = "fb4a8bffb44ae5d3390351d67f320ef3"
21SRC_URI[sha256sum] = "812be817df3d4c25813552be336c6c6ad5aedaf65611b81af3ad9f98fb3c2e50" 20SRC_URI[sha256sum] = "137f19a986382b275bf4a2b1a69eb26689d6f4ac056ddaa21784d6b80eb98faa"
22 21
23DEPENDS = "libtirpc" 22DEPENDS = "libtirpc libnsl2"
24 23
25inherit autotools systemd 24inherit autotools systemd
26SYSTEMD_SERVICE_${PN} = "domainname.service" 25SYSTEMD_SERVICE_${PN} = "domainname.service"
@@ -32,10 +31,9 @@ RCONFLICTS_${PN} += "${PN}-systemd"
32CACHED_CONFIGUREVARS += "ac_cv_prog_STRIP=/bin/true" 31CACHED_CONFIGUREVARS += "ac_cv_prog_STRIP=/bin/true"
33 32
34EXTRA_OECONF = " \ 33EXTRA_OECONF = " \
35 --disable-rpath \ 34 --disable-rpath --disable-domainname \
36 --libdir=${libdir}/yp-nis/ \
37 --includedir=${includedir}/yp-nis/ \
38 " 35 "
36CFLAGS_append_libc-musl = " -Wno-error=\#warnings"
39 37
40FILES_${PN} += " ${libdir}/yp-nis/*.so.*.* ${libdir}/yp-nis/pkgconfig/" 38FILES_${PN} += " ${libdir}/yp-nis/*.so.*.* ${libdir}/yp-nis/pkgconfig/"
41FILES_${PN}-dbg += " ${libdir}/yp-nis/.debug" 39FILES_${PN}-dbg += " ${libdir}/yp-nis/.debug"