Subject: bin/20318: rwhod bug
To: None <gnats-bugs@gnats.netbsd.org>
From: None <root@Krille.Update.UU.SE>
List: netbsd-bugs
Date: 02/12/2003 17:08:17
>Number:         20318
>Category:       bin
>Synopsis:       rwhod cannot compile with DEBUG defined
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    bin-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed Feb 12 08:09:01 PST 2003
>Closed-Date:
>Last-Modified:
>Originator:     Johnny Billquist
>Release:        NetBSD 1.6N
>Organization:
Update
>Environment:
System: NetBSD Krille.Update.UU.SE 1.6N NetBSD 1.6N (Krille) #51: Thu Feb 6 20:02:21 CET 2003 root@Krille.Update.UU.SE:/sys/arch/vax/compile/Krille vax
Architecture: vax
Machine: vax
>Description:
While trying to find out why rwhod no longer worked correctly (fix
in who/utmpentry.c> I found out that rwhod cannot compile if DEBUG is
defined. The reason is that rwhod have it's own sendto function that
it uses if DEBUG is defined. This function don't have the same prototype
as the standard sendto.
>How-To-Repeat:
Define DEBUG and try to compile rwhod.c
>Fix:
Index: rwhod.c
===================================================================
RCS file: /cvsroot/src/usr.sbin/rwhod/rwhod.c,v
retrieving revision 1.19
diff -r1.19 rwhod.c
113c113
< void	 Sendto __P((int, char *, int, int, char *, int));
---
> void	 Sendto __P((int, char *, int, int, struct sockaddr *, int));
469c469
< 	char *to;
---
> 	struct sockaddr *to;
476c476,477
< 	printf("sendto %x.%d\n", ntohl(sin->sin_addr), ntohs(sin->sin_port));
---
> 	printf("sendto %x.%d\n", ntohl(sin->sin_addr.s_addr),
> 	   ntohs(sin->sin_port));
480,481c481,482
< 	    ntohl(w->wd_loadav[0]) / 100.0, ntohl(w->wd_loadav[1]) / 100.0,
< 	    ntohl(w->wd_loadav[2]) / 100.0);
---
> 	   ntohl(w->wd_loadav[0]) / 100.0, ntohl(w->wd_loadav[1]) / 100.0,
> 	   ntohl(w->wd_loadav[2]) / 100.0);

>Release-Note:
>Audit-Trail:
>Unformatted: