r17803: finally get the new libaddns code to build on Solaris 9
authorGerald Carter <jerry@samba.org>
Thu, 24 Aug 2006 18:48:44 +0000 (18:48 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 16:38:49 +0000 (11:38 -0500)
source/libaddns/dns.h
source/libaddns/dnssock.c

index 75bf5f7319230e161f9a1437ecee8dd57e624022..bdc7cb24de4b5f1ab86cb14eb820a0b35d6566f3 100644 (file)
 #  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"
 
 
index 0af30cc1be6a5573a20211a354e8bb3abd6392fa..713d56c70364d77d325b65404297869513eb3f95 100644 (file)
@@ -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 );
        }