Am Wednesday, den 09.09.2009, 08:35 -0700 schrieb Hisashi T Fujinaka:
htodd@amttest:/usr/src/sbin/cgdconfig > make
# lex cgdconfig/cgdlex.c
/usr/src/obj.amd64/tooldir.NetBSD-5.99.16-amd64/bin/nblex -ocgdlex.c
/usr/src/sbin/cgdconfig/cgdlex.l
# yacc cgdconfig/cgdparse.c
/usr/src/obj.amd64/tooldir.NetBSD-5.99.16-amd64/bin/nbyacc -d -o cgdparse.c
/usr/src/sbin/cgdconfig/cgdparse.y
# compile cgdconfig/cgd_kernelops.o
/usr/src/obj.amd64/tooldir.NetBSD-5.99.16-amd64/bin/x86_64--netbsd-gcc -O2
-Wall -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith
-Wno-sign-compare -Wno-traditional -Wa,--fatal-warnings -Wreturn-type -Wswitch
-Wshadow -Wcast-qual -Wwrite-strings -Wextra -Wno-unused-parameter
-Wsign-compare -std=gnu99 -Werror -I/usr/src/sbin/cgdconfig -I.
-DYY_NO_INPUT -I/usr/src/sbin/cgdconfig -nostdinc -isystem /usr/include -c
/usr/src/sbin/cgdconfig/cgd_kernelops.c
cc1: warnings being treated as errors
/usr/src/sbin/cgdconfig/cgd_kernelops.c:45: warning: initialization from
incompatible pointer type
*** Error code 1
Stop.
make: stopped in /usr/src/sbin/cgdconfig
Exit 1
ditto, the following fixes it:
Index: cgd_kernelops.h
===================================================================
RCS file: /pub/NetBSD-CVS/src/sbin/cgdconfig/cgd_kernelops.h,v
retrieving revision 1.1
diff -p -U8 -r1.1 cgd_kernelops.h
--- cgd_kernelops.h 8 Sep 2009 21:36:35 -0000 1.1
+++ cgd_kernelops.h 9 Sep 2009 16:08:24 -0000
@@ -33,13 +33,13 @@
#include <sys/socket.h>
#include <fcntl.h>
struct cgd_kernelops {
int (*ko_open)(const char *, int, mode_t);
int (*ko_ioctl)(int, unsigned long, void *);
int (*ko_close)(int);
- int (*ko_pread)(int, void *, size_t, off_t);
+ ssize_t (*ko_pread)(int, void *, size_t, off_t);
};
extern const struct cgd_kernelops cgd_kops;
#endif /* _CGD_KERNEL_OPS_H_ */