# HG changeset patch # User andy simpson # Date 1284742204 -3600 # Node ID b670675990af68ab073c1f352d24c4a406e5b7cd # Parent 82ca0c6a68ed953fedb8cc49c8280906d5ab93a8# Parent 104bd6aeae10633b740fddd5e179b58e49e13996 Merge Bug 2603 and Bug 3123 plus move exports to rom/bld.inf diff -r 104bd6aeae10 -r b670675990af genericopenlibs/openenvcore/libc/src/net/getaddrinfo.c --- a/genericopenlibs/openenvcore/libc/src/net/getaddrinfo.c Thu Sep 02 17:14:31 2010 +0100 +++ b/genericopenlibs/openenvcore/libc/src/net/getaddrinfo.c Fri Sep 17 17:50:04 2010 +0100 @@ -1746,6 +1746,7 @@ struct addrinfo *currNative; int haveV6asV4 = 0; int haveV4asV6 = 0; + int haverealv4 = 0; /* Get the list of addresses using the native api */ int ret = getaddrinfo_private(hostname, pai, &resNative); if (ret != 0) @@ -1776,6 +1777,7 @@ } cur = cur->ai_next; + haverealv4 = 1; } } @@ -1832,7 +1834,7 @@ if (haveV6asV4) { - if ((hints->ai_family == PF_INET && !sentinel.ai_next) || (hints->ai_flags & (AI_V4MAPPED|AI_ALL))) + if ((hints->ai_family == PF_INET && !sentinel.ai_next) || (hints->ai_family == PF_UNSPEC && !haverealv4) || (hints->ai_flags & (AI_V4MAPPED|AI_ALL))) { currNative = resNative; while (currNative)