Print this page
1926 libresolv evades compiler warnings

@@ -18,10 +18,11 @@
  *
  * CDDL HEADER END
  */
 
 /*
+ * Copyright 2015 Gary Mills
  * Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
  * Use is subject to license terms.
  */
 
 /*      Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */

@@ -35,19 +36,20 @@
  * University Acknowledgment- Portions of this document are derived from
  * software developed by the University of California, Berkeley, and its
  * contributors.
  */
 
-#pragma ident   "%Z%%M% %I%     %E% SMI"
-
 #include <sys/types.h>
+#include <sys/socket.h>
 #include <netinet/in.h>
+#include <arpa/inet.h>
 #include <stdio.h>
+#include <string.h>
 #include <arpa/nameser.h>
+#include <resolv.h>
+#include "crossl.h"
 
-extern char *p_cdname(), *p_rr(), *p_type(), *p_class(), *p_time();
-extern char *inet_ntoa();
 void fp_query(char *msg, FILE *file);
 
 char *_res_opcodes[] = {
         "QUERY",
         "IQUERY",

@@ -193,11 +195,12 @@
         FILE *file;
 {
         char name[MAXDNAME];
         int n;
 
-        if ((n = dn_expand(msg, msg + 512, cp, name, sizeof (name))) < 0)
+        if ((n = dn_expand((u_char *)msg, (u_char *)(msg + 512), (u_char *)cp,
+            (u_char *)name, sizeof (name))) < 0)
                 return (NULL);
         if (name[0] == '\0') {
                 name[0] = '.';
                 name[1] = '\0';
         }