dnsapi: Do not fail if NETDB_INTERNAL is not present

Bruno Jesus 00cpxxx at gmail.com
Sun Jul 6 20:22:18 CDT 2014


Small libraries like musl and dietlibc do not define NETDB_INTERNAL
because it is not POSIX. To increase wine compatibility with them I
added a ifdef and I don't see any harm in doing so.

This addresses another problem described by Felix Janda a few weeks ago.
-------------- next part --------------
diff --git a/dlls/dnsapi/query.c b/dlls/dnsapi/query.c
index 578239e..e05205b 100644
--- a/dlls/dnsapi/query.c
+++ b/dlls/dnsapi/query.c
@@ -147,7 +147,9 @@ static DNS_STATUS dns_map_h_errno( int error )
     case HOST_NOT_FOUND: return DNS_ERROR_RCODE_NAME_ERROR;
     case TRY_AGAIN:      return DNS_ERROR_RCODE_SERVER_FAILURE;
     case NO_RECOVERY:    return DNS_ERROR_RCODE_REFUSED;
+#ifdef NETDB_INTERNAL
     case NETDB_INTERNAL: return DNS_ERROR_RCODE;
+#endif
     default:
         FIXME( "unmapped error code: %d\n", error );
         return DNS_ERROR_RCODE_NOT_IMPLEMENTED;


More information about the wine-patches mailing list