BIND 10 trac1526, updated. 102355de8ca47e80fcf3bc2a884f36907b7b7922 [1526] NetBSD compilation fix for perfdhcp.

BIND 10 source code commits bind10-changes at lists.isc.org
Thu Dec 22 16:45:15 UTC 2011


The branch, trac1526 has been updated
       via  102355de8ca47e80fcf3bc2a884f36907b7b7922 (commit)
      from  dd6f8bdc0f67c83aea2f91cd56c21a4b822d735b (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 102355de8ca47e80fcf3bc2a884f36907b7b7922
Author: Tomek Mrugalski <tomasz at isc.org>
Date:   Thu Dec 22 17:44:55 2011 +0100

    [1526] NetBSD compilation fix for perfdhcp.

-----------------------------------------------------------------------

Summary of changes:
 tests/tools/perfdhcp/perfdhcp.c |   14 ++++++++++++--
 1 files changed, 12 insertions(+), 2 deletions(-)

-----------------------------------------------------------------------
diff --git a/tests/tools/perfdhcp/perfdhcp.c b/tests/tools/perfdhcp/perfdhcp.c
index b9795f6..3e38e2d 100644
--- a/tests/tools/perfdhcp/perfdhcp.c
+++ b/tests/tools/perfdhcp/perfdhcp.c
@@ -1918,7 +1918,13 @@ getserveraddr(const int flags)
 		service = "547";
 	}
 	hints.ai_socktype = SOCK_DGRAM;
-	hints.ai_flags = AI_ADDRCONFIG | AI_NUMERICSERV | flags;
+
+	hints.ai_flags = AI_NUMERICSERV | flags;
+#if defined(OS_LINUX)
+        /// TODO: Make this OS_LINUX | OS_MAC as this works on Mac
+        /// and possibly other BSDs.
+	hints.ai_flags |= AI_ADDRCONFIG;
+#endif
 	hints.ai_protocol = IPPROTO_UDP;
 	
 	ret = getaddrinfo(servername, service, &hints, &res);
@@ -2015,7 +2021,11 @@ getlocaladdr(void)
 		service = "546";
 	}
 	hints.ai_socktype = SOCK_DGRAM;
-	hints.ai_flags = AI_ADDRCONFIG | AI_NUMERICSERV;
+	hints.ai_flags =  AI_NUMERICSERV;
+#if defined(OS_LINUX)
+	// TODO: this will work on Mac as well (so it should be OS_LINUX | OS_MAC)
+	hints.ai_flags |= AI_ADDRCONFIG;
+#endif
 	hints.ai_protocol = IPPROTO_UDP;
 	
 	ret = getaddrinfo(localname, service, &hints, &res);




More information about the bind10-changes mailing list