diff options
-rw-r--r-- | source3/libaddns/dns.h | 5 | ||||
-rw-r--r-- | source3/libaddns/dnssock.c | 2 |
2 files changed, 6 insertions, 1 deletions
diff --git a/source3/libaddns/dns.h b/source3/libaddns/dns.h index 75bf5f7319..bdc7cb24de 100644 --- a/source3/libaddns/dns.h +++ b/source3/libaddns/dns.h @@ -152,6 +152,11 @@ # endif /* don't lie. If we don't have it, then don't use it */ #endif +/* needed on Sun boxes */ +#ifndef INADDR_NONE +#define INADDR_NONE 0xFFFFFFFF +#endif + #include "dnserr.h" diff --git a/source3/libaddns/dnssock.c b/source3/libaddns/dnssock.c index 0af30cc1be..713d56c703 100644 --- a/source3/libaddns/dnssock.c +++ b/source3/libaddns/dnssock.c @@ -59,7 +59,7 @@ static DNS_ERROR DNSTCPOpen( char *nameserver, HANDLE * phDNSServer ) s_in.sin_addr.s_addr = ulAddress; s_in.sin_port = htons( DNS_TCP_PORT ); - if ( (connect( sockServer, &s_in, sizeof( s_in ))) == SOCKET_ERROR ) { + if ( (connect( sockServer, (struct sockaddr*)&s_in, sizeof( s_in ))) == SOCKET_ERROR ) { dwError = ERROR_DNS_CONNECTION_FAILED; BAIL_ON_DNS_ERROR( dwError ); } |