Files
pkgsrc-ng/net/ORBit2/patches/patch-ae
2013-09-26 17:14:40 +02:00

26 lines
775 B
Plaintext

$NetBSD: patch-ae,v 1.1 2008/02/13 19:36:48 drochner Exp $
--- linc2/src/linc-protocols.c.orig 2008-01-30 12:08:40.000000000 +0100
+++ linc2/src/linc-protocols.c
@@ -582,14 +582,20 @@ link_protocol_get_sockaddr_ipv4 (const L
if ((saddr->sin_addr.s_addr = inet_addr (hostname)) == INADDR_NONE) {
int i;
+#ifndef __NetBSD__ /* don't touch global state */
LINK_RESOLV_UNSET_IPV6;
#ifdef HAVE_RESOLV_H
if (!(_res.options & RES_INIT))
res_init();
#endif
+#endif /* NetBSD */
d_printf("%s:%s:%d:gethostbyname(%s)\n", __FILE__, __FUNCTION__, __LINE__, hostname);
+#ifdef __NetBSD__
+ host = gethostbyname2 (hostname, AF_INET);
+#else
host = gethostbyname (hostname);
+#endif
if (!host) {
g_free (saddr);
return NULL;