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,23 +36,23 @@
  * 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/param.h>
 #include <sys/socket.h>
 #include <netinet/in.h>
 #include <ctype.h>
 #include <netdb.h>
 #include <stdio.h>
 #include <errno.h>
 #include <string.h>
+#include <stdlib.h>
 #include <arpa/inet.h>
 #include <arpa/nameser.h>
 #include <resolv.h>
+#include "crossl.h"
 
 #if PACKETSZ > 1024
 #define MAXPACKET       PACKETSZ
 #else
 #define MAXPACKET       1024

@@ -94,11 +95,11 @@
                         printf("res_query: mkquery failed\n");
 #endif
                 h_errno = NO_RECOVERY;
                 return (n);
         }
-        n = res_send(buf, n, answer, anslen);
+        n = res_send(buf, n, (char *)answer, anslen);
         if (n < 0) {
 #ifdef DEBUG
                 if (_res.options & RES_DEBUG)
                         printf("res_query: send error\n");
 #endif

@@ -269,11 +270,11 @@
 hostalias(name)
         register char *name;
 {
         register char *C1, *C2;
         FILE *fp;
-        char *file, *getenv(), *strcpy(), *strncpy();
+        char *file;
         char buf[BUFSIZ];
         static char abuf[MAXDNAME];
 
         file = getenv("HOSTALIASES");
         if (file == NULL || (fp = fopen(file, "r")) == NULL)