mirror of
https://github.com/Stichting-MINIX-Research-Foundation/pkgsrc-ng.git
synced 2025-08-04 10:18:09 -04:00
29 lines
740 B
Plaintext
29 lines
740 B
Plaintext
$NetBSD: patch-ap,v 1.1 2014/06/15 20:48:50 jnemeth Exp $
|
|
|
|
--- libmilter/sm_gethost.c.orig 2014-03-06 17:31:30.000000000 +0000
|
|
+++ libmilter/sm_gethost.c
|
|
@@ -49,19 +49,14 @@ sm_getipnodebyname(name, family, flags,
|
|
int flags;
|
|
int *err;
|
|
{
|
|
- bool resv6 = true;
|
|
struct hostent *h;
|
|
|
|
- if (family == AF_INET6)
|
|
- {
|
|
- /* From RFC2133, section 6.1 */
|
|
- resv6 = bitset(RES_USE_INET6, _res.options);
|
|
- _res.options |= RES_USE_INET6;
|
|
- }
|
|
SM_SET_H_ERRNO(0);
|
|
+# if NETINET6
|
|
+ h = gethostbyname2(name, family);
|
|
+# else
|
|
h = gethostbyname(name);
|
|
- if (family == AF_INET6 && !resv6)
|
|
- _res.options &= ~RES_USE_INET6;
|
|
+# endif
|
|
|
|
/* the function is supposed to return only the requested family */
|
|
if (h != NULL && h->h_addrtype != family)
|