Print this page
1926 libresolv evades compiler warnings
*** 18,27 ****
--- 18,28 ----
*
* 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,57 ****
* 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 <arpa/inet.h>
#include <arpa/nameser.h>
#include <resolv.h>
#if PACKETSZ > 1024
#define MAXPACKET PACKETSZ
#else
#define MAXPACKET 1024
--- 36,58 ----
* University Acknowledgment- Portions of this document are derived from
* software developed by the University of California, Berkeley, and its
* contributors.
*/
#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,104 ****
printf("res_query: mkquery failed\n");
#endif
h_errno = NO_RECOVERY;
return (n);
}
! n = res_send(buf, n, answer, anslen);
if (n < 0) {
#ifdef DEBUG
if (_res.options & RES_DEBUG)
printf("res_query: send error\n");
#endif
--- 95,105 ----
printf("res_query: mkquery failed\n");
#endif
h_errno = NO_RECOVERY;
return (n);
}
! 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,279 ****
hostalias(name)
register char *name;
{
register char *C1, *C2;
FILE *fp;
! char *file, *getenv(), *strcpy(), *strncpy();
char buf[BUFSIZ];
static char abuf[MAXDNAME];
file = getenv("HOSTALIASES");
if (file == NULL || (fp = fopen(file, "r")) == NULL)
--- 270,280 ----
hostalias(name)
register char *name;
{
register char *C1, *C2;
FILE *fp;
! char *file;
char buf[BUFSIZ];
static char abuf[MAXDNAME];
file = getenv("HOSTALIASES");
if (file == NULL || (fp = fopen(file, "r")) == NULL)