summaryrefslogtreecommitdiff
path: root/source3/libaddns
diff options
context:
space:
mode:
authorGerald Carter <jerry@samba.org>2006-08-24 18:48:44 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 11:38:49 -0500
commit0d1e4dc5b01323282d24c61da78add5030cf545c (patch)
tree78245ebc2eddd604a12493f6e0fe6f1debb677ec /source3/libaddns
parentbfbe5a50c66bdd77d5805644145f0c1e53684a5d (diff)
downloadsamba-0d1e4dc5b01323282d24c61da78add5030cf545c.tar.gz
samba-0d1e4dc5b01323282d24c61da78add5030cf545c.tar.bz2
samba-0d1e4dc5b01323282d24c61da78add5030cf545c.zip
r17803: finally get the new libaddns code to build on Solaris 9
(This used to be commit 6a4f4ce016dc47ff4b433208266c4616be7e2770)
Diffstat (limited to 'source3/libaddns')
-rw-r--r--source3/libaddns/dns.h5
-rw-r--r--source3/libaddns/dnssock.c2
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 );
}