Subject: pkg/22274: struct stat change breaks coda5_server build
To: None <gnats-bugs@gnats.netbsd.org>
From: Gary Duzan <gary@duzan.org>
List: netbsd-bugs
Date: 07/25/2003 22:49:57
>Number: 22274
>Category: pkg
>Synopsis: struct stat change breaks coda5_server build
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: pkg-manager
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Sat Jul 26 02:51:00 UTC 2003
>Closed-Date:
>Last-Modified:
>Originator: Gary Duzan
>Release: NetBSD 1.6U
>Organization:
Not Much
>Environment:
System: NetBSD capo 1.6U NetBSD 1.6U (CAPO) #0: Sun Jun 22 12:17:01 EDT 2003 gary@capo:/usr2/src/sys/arch/i386/compile/CAPO i386
Architecture: i386
Machine: i386
>Description:
Under current, building coda5_server failes to compile vproc.cc:
c++ -fno-exceptions -fno-operator-names -MD -DHAVE_CONFIG_H -D__BSD44__ -I. -I/usr2/pkgsrc/net/coda5_server/work/coda-5.3.19/include -I/usr2/pkgsrc/net/coda5_server/work/coda-5.3.19 -O2 -I/usr/pkg/include -DVENUS -DTIMING -DVENUSDEBUG -DRVM_USELWP -I/usr/pkg/include -c -o vproc.o vproc.cc
vproc.cc: In function `void va_init(coda_vattr *)':
vproc.cc:763: warning: large integer implicitly truncated to unsigned type
vproc.cc: In function `void VattrToStat(coda_vattr *, stat *)':
vproc.cc:787: `struct stat' has no member named `st_qspare'
vproc.cc:788: `struct stat' has no member named `st_qspare'
gmake[2]: *** [vproc.o] Error 1
>How-To-Repeat:
Try to build pkgsrc/net/coda5_server on a current box.
>Fix:
Here is the patch I used:
===========================================================================
--- /usr2/pkgsrc/net/coda5_server/work/coda-5.3.19/coda-src/venus/vproc.cc.orig 2003-07-25 22:41:02.000000000 -0400
+++ /usr2/pkgsrc/net/coda5_server/work/coda-5.3.19/coda-src/venus/vproc.cc 2003-07-25 22:42:47.000000000 -0400
@@ -784,8 +784,12 @@
#if !defined(NetBSD1_3) && !defined(__NetBSD_Version__)
sp->st_lspare = 0;
#endif
+#if !defined(__NetBSD_Version__) || __NetBSD_Version__ < 106170000
sp->st_qspare[0] = 0;
sp->st_qspare[1] = 0;
+#else
+ sp->st_spare0 = 0;
+#endif
#endif /* __BSD44__ */
}
===========================================================================
The change went in around 1.6Q, if I've read the logs right,
which is why I checked that version, but it isn't necessarily
the best option. One other possibility is to check if
st_birthtime is defined, since it was added at the same time.
>Release-Note:
>Audit-Trail:
>Unformatted: