]> git.saurik.com Git - apple/ipsec.git/blobdiff - ipsec-tools/racoon/getcertsbyname.c
ipsec-286.1.1.tar.gz
[apple/ipsec.git] / ipsec-tools / racoon / getcertsbyname.c
index 890f067cb5a84d935d11c06a4eb5bf07cc297a68..74a8501262c0353c7b4364a4a2fcea60850f5abc 100644 (file)
@@ -29,9 +29,6 @@
  * SUCH DAMAGE.
  */
 
-//%%%HWR Do we need this?
-#define BIND_8_COMPAT
-
 #include "config.h"
 
 #include <sys/types.h>
@@ -39,7 +36,7 @@
 #include <sys/socket.h>
 
 #include <netinet/in.h>
-#include <arpa/nameser.h>
+#include <arpa/nameser_compat.h>
 #include <resolv.h>
 #ifdef HAVE_LWRES_GETRRSETBYNAME
 #include <lwres/netdb.h>
 #include <strings.h>
 #endif
 
+#include "var.h"
 #include "netdb_dnssec.h"
 
 /* XXX should it use ci_errno to hold errno instead of h_errno ? */
 extern int h_errno;
 
-static struct certinfo *getnewci __P((int, int, int, int, int, 
-                       unsigned char *));
+static struct certinfo *getnewci (int, int, int, int, int, 
+                       unsigned char *);
 
 static struct certinfo *
 getnewci(qtype, keytag, algorithm, flags, certlen, cert)
@@ -247,7 +245,7 @@ getcertsbyname(name, res)
        /* parse CERT RR */
        eom = answer + anslen;
 
-       hp = (HEADER *)answer;
+       hp = ALIGNED_CAST(HEADER *)answer;
        qdcount = ntohs(hp->qdcount);
        ancount = ntohs(hp->ancount);