Subject: bin/32208: netbsd-2: usr.bin/cap_mkdb fails to build
To: None <gnats-admin@netbsd.org, netbsd-bugs@netbsd.org>
From: None <j+nbsd@2005.salmi.ch>
List: netbsd-bugs
Date: 12/01/2005 14:06:00
>Number: 32208
>Category: bin
>Synopsis: netbsd-2: usr.bin/cap_mkdb fails to build
>Confidential: no
>Severity: serious
>Priority: high
>Responsible: bin-bug-people
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Thu Dec 01 14:06:00 +0000 2005
>Originator: Jukka Salmi
>Release: NetBSD 2.1_STABLE
>Environment:
NetBSD moray.salmi.ch 2.1_STABLE NetBSD 2.1_STABLE (LIBKVER) #0: Tue Jan 19 00:00:00 UTC 2038 root@localhost:/sys/arch/i386/compile/LIBKVER i386
Architecture: i386
Machine: i386
>Description:
Building usr.bin/cap_mkdb using netbsd-2 sources currently fails.
>How-To-Repeat:
$ cd src/usr.bin/cap_mkdb && make
[...]
# compile cap_mkdb/cap_mkdb.o
/opt/tools/i386/bin/i386--netbsdelf-gcc -O2 -Wall -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Wno-sign-compare -Wno-traditional -Wno-uninitialized -Werror -nostdinc -isystem /opt/dst/i386/usr/include -c /usr/src/usr.bin/cap_mkdb/cap_mkdb.c
/usr/src/usr.bin/cap_mkdb/cap_mkdb.c: In function `db_build':
/usr/src/usr.bin/cap_mkdb/cap_mkdb.c:180: warning: passing arg 2 of `cgetnext' from incompatible pointer type
[...]
>Fix:
Index: cap_mkdb.c
===================================================================
RCS file: /cvsroot/src/usr.bin/cap_mkdb/cap_mkdb.c,v
retrieving revision 1.20.4.2
diff -u -p -r1.20.4.2 cap_mkdb.c
--- cap_mkdb.c 14 Nov 2005 22:00:54 -0000 1.20.4.2
+++ cap_mkdb.c 1 Dec 2005 14:02:35 -0000
@@ -177,7 +177,7 @@ db_build(const char **ifiles)
data.data = NULL;
key.data = NULL;
- for (reccnt = 0, bplen = 0; (st = cgetnext(&bp, ifiles)) > 0; free(bp)){
+ for (reccnt = 0, bplen = 0; (st = cgetnext(&bp, (char **)ifiles)) > 0; free(bp)){
/*
* Allocate enough memory to store record, terminating