From 0d1e4dc5b01323282d24c61da78add5030cf545c Mon Sep 17 00:00:00 2001 From: Gerald Carter Date: Thu, 24 Aug 2006 18:48:44 +0000 Subject: r17803: finally get the new libaddns code to build on Solaris 9 (This used to be commit 6a4f4ce016dc47ff4b433208266c4616be7e2770) --- source3/libaddns/dns.h | 5 +++++ source3/libaddns/dnssock.c | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) (limited to 'source3') 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 ); } -- cgit