pkgsrc/net/ORBit2/patches/patch-ae
drochner fcf2c54505 update to 2.14.12
changes:
-Fix off by one in all method name lengths. Fixes interoperability
 with other ORBs
-Fix the build with glib 2.15

pkgsrc fix: don't touch _res (resolver state) on NetBSD, it is
not thread safe
2008-02-13 19:36:48 +00:00

25 lines
775 B
Text

$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;