openbsd-ports/lang/mono/patches/patch-mono_metadata_socket-io_c

31 lines
1.2 KiB
Plaintext
Raw Normal View History

$OpenBSD: patch-mono_metadata_socket-io_c,v 1.1 2009/09/06 07:25:27 ajacoutot Exp $
--- mono/metadata/socket-io.c.orig Thu Jul 2 22:21:10 2009
+++ mono/metadata/socket-io.c Tue Sep 1 14:57:32 2009
@@ -2779,7 +2779,7 @@ MonoBoolean ves_icall_System_Net_Dns_GetHostByName_int
memset(&hints, 0, sizeof(hints));
hints.ai_family = get_family_hint ();
hints.ai_socktype = SOCK_STREAM;
- hints.ai_flags = AI_CANONNAME | AI_ADDRCONFIG;
+ hints.ai_flags = AI_CANONNAME;
if (*hostname && getaddrinfo(hostname, NULL, &hints, &info) == -1) {
return(FALSE);
@@ -2924,7 +2924,7 @@ extern MonoBoolean ves_icall_System_Net_Dns_GetHostByA
struct sockaddr_in6 saddr6;
struct addrinfo *info = NULL, hints;
gint32 family;
- char hostname[1024] = {0};
+ char hostname[NI_MAXHOST] = {0};
int flags = 0;
#else
struct in_addr inaddr;
@@ -2981,7 +2981,7 @@ extern MonoBoolean ves_icall_System_Net_Dns_GetHostByA
memset (&hints, 0, sizeof(hints));
hints.ai_family = get_family_hint ();
hints.ai_socktype = SOCK_STREAM;
- hints.ai_flags = AI_CANONNAME | AI_ADDRCONFIG;
+ hints.ai_flags = AI_CANONNAME;
if( getaddrinfo (hostname, NULL, &hints, &info) == -1 ) {
return(FALSE);