Subject: lib/17050: Build fail in lib/libc/net (netbsd-1-6)
To: None <gnats-bugs@gnats.netbsd.org>
From: None <epg@pretzelnet.org>
List: netbsd-bugs
Date: 05/26/2002 14:07:03
>Number:         17050
>Category:       lib
>Synopsis:       Build fail in lib/libc/net (netbsd-1-6)
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    lib-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sun May 26 12:08:01 PDT 2002
>Closed-Date:
>Last-Modified:
>Originator:     Eric Gillespie
>Release:        NetBSD 1.6_BETA1 (2002-05-25)
>Organization:
>Environment:
System: NetBSD wundagore.pretzelnet.org 1.6_BETA1 NetBSD 1.6_BETA1 ($Rev: 16 $) #0: Sat May 25 23:15:40 EST 2002 epg@wundagore.pretzelnet.org:/u/src/sys/arch/i386/compile/WUNDAGORE i386
Architecture: i386
Machine: i386
>Description:
/u/src/lib/libc/net/rcmd.c(278): warning: conversion to 'int' due to prototype, 
arg #7 [259]                               
/u/src/lib/libc/net/rcmd.c(286): warning: conversion to 'int' due to prototype, 
arg #7 [259]                               
/u/src/lib/libc/net/rcmd.c(946): warning: conversion to 'int' due to prototype, 
arg #7 [259]                               
/u/src/lib/libc/net/rcmd.c(964): warning: conversion to 'int' due to prototype, 
arg #7 [259]                               
/u/src/lib/libc/net/rcmd.c(1007): warning: conversion to 'int' due to prototype,
 arg #7 [259]                              
/u/src/lib/libc/net/rcmd.c(1026): warning: conversion to 'int' due to prototype,
 arg #7 [259]

>How-To-Repeat:
Run build.sh or cd to lib/libc and run make.
>Fix:
My build has not yet finished so i am not sure if this is the correct
fix, but it did successfully compile libc:

Index: net/rcmd.c
===================================================================
RCS file: /cvsroot/basesrc/lib/libc/net/rcmd.c,v
retrieving revision 1.47
diff -a -u -r1.47 rcmd.c
--- rcmd.c      2002/05/14 23:58:08     1.47
+++ rcmd.c      2002/05/26 19:05:01
@@ -268,9 +268,9 @@
                        int oerrno = errno;
                        char hbuf[NI_MAXHOST];
 #ifdef NI_WITHSCOPEID
-                       const u_int niflags = NI_NUMERICHOST | NI_WITHSCOPEID;
+                       const int niflags = NI_NUMERICHOST | NI_WITHSCOPEID;
 #else
-                       const u_int niflags = NI_NUMERICHOST;
+                       const int niflags = NI_NUMERICHOST;
 #endif
 
                        hbuf[0] = '\0';
@@ -933,9 +933,9 @@
        char h1[NI_MAXHOST], h2[NI_MAXHOST];
        int error;
 #ifdef NI_WITHSCOPEID
-       const u_int niflags = NI_NUMERICHOST | NI_WITHSCOPEID;
+       const int niflags = NI_NUMERICHOST | NI_WITHSCOPEID;
 #else
-       const u_int niflags = NI_NUMERICHOST;
+       const int niflags = NI_NUMERICHOST;
 #endif
 
        _DIAGASSERT(raddr != NULL);
@@ -992,9 +992,9 @@
        struct addrinfo hints, *res, *r;
        int error;
 #ifdef NI_WITHSCOPEID
-       const u_int niflags = NI_NUMERICHOST | NI_WITHSCOPEID;
+       const int niflags = NI_NUMERICHOST | NI_WITHSCOPEID;
 #else
-       const u_int niflags = NI_NUMERICHOST;
+       const int niflags = NI_NUMERICHOST;
 #endif
 
        _DIAGASSERT(raddr != NULL);
>Release-Note:
>Audit-Trail:
>Unformatted: