Subject: Re: error in todays sup?
To: None <cohentl@clarkson.edu, port-alpha@netbsd.org>
From: Ross Harvey <ross@ghs.com>
List: port-alpha
Date: 03/30/1999 12:53:57
> From port-alpha-owner-ross=teraflop.com@netbsd.org Tue Mar 30 11:41:45 1999
> Date: Tue, 30 Mar 1999 14:32:36 -0500 (EST)
> From: Todd Cohen <cohentl@clarkson.edu>
> To: NetBSD-Alpha <port-alpha@netbsd.org>
> Subject: error in todays sup?
>
> not sure if this is the right list or not, please let me know if it
> isn't.. from todays sup, compiling on an alphastation 200..
>
> cc -O2 -Werror -I. -I/usr/src/usr.sbin/bind/host/../include -c host.c
> cc1: warnings being treated as errors
> host.c: In function `main':
> host.c:273: warning: cast to pointer from integer of different size
> host.c:275: warning: cast to pointer from integer of different size
Sure, this is the right list. Here is a patch, or just wait for tomorrow's
sup...
Index: host.c
===================================================================
RCS file: /cvsroot/src/usr.sbin/bind/host/host.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -w -r1.2 -r1.3
--- host.c 1999/03/26 20:12:45 1.2
+++ host.c 1999/03/30 20:36:58 1.3
@@ -1,5 +1,5 @@
#ifndef lint
-static char rcsid[] = "$Id: host.c,v 1.2 1999/03/26 20:12:45 kim Exp $";
+static char rcsid[] = "$Id: host.c,v 1.3 1999/03/30 20:36:58 ross Exp $";
#endif /* not lint */
/*
@@ -268,11 +268,13 @@
ncnames = 5;
while (hp == NULL && h_errno == TRY_AGAIN) {
if (addr.s_addr == INADDR_NONE) {
+ typedef unsigned long uL;
+
cname = NULL;
if (oldcname == NULL)
- hp = (struct hostent *)gethostinfo(v[1]);
+ hp = (struct hostent *)(uL)gethostinfo(v[1]);
else
- hp = (struct hostent *)gethostinfo(oldcname);
+ hp = (struct hostent *)(uL)gethostinfo(oldcname);
if (cname) {
if (ncnames-- == 0) {
printf("Too many cnames. Loop?\n");