$NetBSD: patch-ao,v 1.2 2010/05/26 15:56:39 taca Exp $

--- lib/bind/irs/getaddrinfo.c.orig	2006-11-13 05:00:56.000000000 +0000
+++ lib/bind/irs/getaddrinfo.c
@@ -336,7 +336,8 @@ getaddrinfo(hostname, servname, hints, r
 	pai->ai_family = PF_UNSPEC;
 	pai->ai_socktype = ANY;
 	pai->ai_protocol = ANY;
-#if defined(sun) && defined(_SOCKLEN_T) && defined(__sparcv9)
+#if (defined(sun) && defined(_SOCKLEN_T) && defined(__sparc9)) || (defined(__NetBSD__) && (((defined(__sparc__) || defined(__i386__)) && defined(_LP64)) || defined(__alpha__)))
+
 	/*
 	 * clear _ai_pad to preserve binary
 	 * compatibility with previously compiled 64-bit
@@ -369,7 +370,7 @@ getaddrinfo(hostname, servname, hints, r
 		}
 		memcpy(pai, hints, sizeof(*pai));
 
-#if defined(sun) && defined(_SOCKLEN_T) && defined(__sparcv9)
+#if (defined(sun) && defined(_SOCKLEN_T) && defined(__sparc9)) || (defined(__NetBSD__) && (((defined(__sparc__) || defined(__i386__)) && defined(_LP64)) || defined(__alpha__)))
 		/*
 		 * We need to clear _ai_pad to preserve binary
 		 * compatibility.  See prior comment.
