mesa3d-headers: remove installation of OpenVG headers
[buildroot-gz.git] / package / rtptools / 0001-host2ip.c-disable-NIS-support-for-toolchains-lacking.patch
blob1bf7c134916999c2d6732a2b0e964368e0dcbae0
1 From f8ffde6c0c0a9008cd65601f6c9712899106e42c Mon Sep 17 00:00:00 2001
2 From: "Yann E. MORIN" <yann.morin.1998@free.fr>
3 Date: Mon, 11 Apr 2016 23:03:48 +0200
4 Subject: [PATCH] host2ip.c: disable NIS support for toolchains lacking SUN RPC
6 Some toolchains are missing SUN RPC; this is the case for toolchains
7 based on uClibc, and some glibc-based toolchains (when SUN RPC headers
8 were taken out of glibc).
10 Add a configure check for the required SUN RPC header, and make the code
11 using SUN RPC conditional on the result.
13 Also drop the legacy AM_C_PROTOTYPES: it is no longer supported by
14 autoconf and breaks autoreconf.
16 Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
17 [yann.morin.1998@free.fr: add the ./configure check; do not include
18 features.h; do not check specifically for uClibc]
19 Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
20 ---
21 configure.in | 3 ++-
22 host2ip.c | 5 +++++
23 2 files changed, 7 insertions(+), 1 deletion(-)
25 diff --git a/configure.in b/configure.in
26 index de394cf..889e6ed 100644
27 --- a/configure.in
28 +++ b/configure.in
29 @@ -39,9 +39,10 @@ CU_CHECK_LIB(socket, socket)
30 dnl Checks for header files.
31 AC_HEADER_STDC
32 AC_CHECK_HEADERS(search.h sys/time.h unistd.h)
33 +AC_CHECK_HEADER([rpcsvc/ypclnt.h],
34 + [AC_DEFINE([HAVE_YP],[1],[Define to 1 if you have rpcsvc/ypclnt.h])])
36 dnl Checks for typedefs, structures, and compiler characteristics.
37 -AM_C_PROTOTYPES
38 AC_C_CONST
39 AC_C_BIGENDIAN
40 AC_TYPE_UID_T
41 diff --git a/host2ip.c b/host2ip.c
42 index b094343..95014cd 100644
43 --- a/host2ip.c
44 +++ b/host2ip.c
45 @@ -3,7 +3,10 @@
46 #include <netdb.h> /* gethostbyname() */
47 #include <netinet/in.h> /* sockaddr_in */
48 #include <arpa/inet.h> /* inet_addr() */
49 +#ifdef HAVE_YP
50 #include <rpcsvc/ypclnt.h> /* YP */
51 +#endif
53 #include <string.h> /* strlen() added by Akira 12/27/01 */
54 #include "sysdep.h"
56 @@ -28,6 +31,7 @@ struct in_addr host2ip(char *host)
57 else if ((hep = gethostbyname(host))) {
58 in = *(struct in_addr *)(hep->h_addr_list[0]);
60 +#ifdef HAVE_YP
61 /* As a last resort, try YP. */
62 else {
63 static char *domain = 0; /* YP domain */
64 @@ -39,5 +43,6 @@ struct in_addr host2ip(char *host)
65 in.s_addr = inet_addr(value);
68 +#endif
69 return in;
70 } /* host2ip */
71 --
72 1.9.1