mirror of
https://github.com/Stichting-MINIX-Research-Foundation/pkgsrc-ng.git
synced 2025-08-03 17:59:07 -04:00
44 lines
1.3 KiB
Plaintext
44 lines
1.3 KiB
Plaintext
$NetBSD: patch-eq,v 1.1 2010/09/10 03:29:01 taca Exp $
|
|
|
|
* r26209: rename {addr,name}info functions to ensure those are used on darwin.
|
|
|
|
--- ext/socket/getaddrinfo.c.orig 2009-02-25 06:06:08.000000000 +0000
|
|
+++ ext/socket/getaddrinfo.c
|
|
@@ -87,10 +87,6 @@
|
|
#include "addrinfo.h"
|
|
#include "sockport.h"
|
|
|
|
-#if defined(__KAME__) && defined(INET6)
|
|
-# define FAITH
|
|
-#endif
|
|
-
|
|
#define SUCCESS 0
|
|
#define ANY 0
|
|
#define YES 1
|
|
@@ -493,11 +489,7 @@ getaddrinfo(hostname, servname, hints, r
|
|
break;
|
|
#ifdef INET6
|
|
case AF_INET6:
|
|
-#ifdef HAVE_ADDR8
|
|
- pfx = ((struct in6_addr *)pton)->s6_addr8[0];
|
|
-#else
|
|
pfx = ((struct in6_addr *)pton)->s6_addr[0];
|
|
-#endif
|
|
if (pfx == 0 || pfx == 0xfe || pfx == 0xff)
|
|
pai->ai_flags &= ~AI_CANONNAME;
|
|
break;
|
|
@@ -673,9 +665,10 @@ get_addr(hostname, af, res, pai, port0)
|
|
|
|
GET_AI(cur->ai_next, &afdl[N_INET6], ap, port);
|
|
in6 = &((struct sockaddr_in6 *)cur->ai_next->ai_addr)->sin6_addr;
|
|
- memcpy(&in6->s6_addr32[0], &faith_prefix,
|
|
- sizeof(struct in6_addr) - sizeof(struct in_addr));
|
|
- memcpy(&in6->s6_addr32[3], ap, sizeof(struct in_addr));
|
|
+ memcpy(&in6->s6_addr, &faith_prefix,
|
|
+ sizeof(struct in6_addr) - sizeof(struct in_addr));
|
|
+ memcpy(&in6->s6_addr + sizeof(struct in_addr), ap,
|
|
+ sizeof(struct in_addr));
|
|
} else
|
|
#endif /* FAITH */
|
|
GET_AI(cur->ai_next, afd, ap, port);
|