Subject: Build error on NetBSD

From: John Goerzen <[email-masked]>
Date: Tue, 03 Aug 2021 22:17:14 -0500

Hi,

SDF.org runs a long-running public-access Unix system, and is 
active in the gopherspace, and other assorted things.  They also 
offer UUCP yet, so I figured it would be a perfect place to 
introduce NNCP.

In trying to build NNCP 7.5.0, I got:

jgoerzen@sverige:~/nncp-7.5.0$ PREFIX=$HOME/nncp ./contrib/do 
install
do  install
do    bin/all
do      bin/hjson-cli
do      bin/nncp-bundle
# go.cypherpunks.ru/nncp/v7
./ctx.go:154:12: undefined: unix.Statfs
./ctx.go:157:16: s.Bavail undefined (type unix.Statfs_t has no 
field or method Bavail)
./ctx.go:157:32: s.Bsize undefined (type unix.Statfs_t has no 
field or method Bsize)
do:     nncp-bundle: got exit code 2
do:   all: got exit code 1
do: install: got exit code 1
jgoerzen@sverige:~/nncp-7.5.0$ uname -a
NetBSD sverige 9.1 NetBSD 9.1 (GENERIC) #0: Sun Oct 18 19:24:30 
UTC 2020 
[email-masked]:/usr/src/sys/arch/amd64/compile/GENERIC 
amd64
jgoerzen@sverige:~/nncp-7.5.0$ go version
go version go1.15.5 netbsd/amd64

I guess that, at least in Go, Statfs is unimplemented or 
incompletely implemented on NetBSD.  I don't know enough about Go 
to know if this can be worked around easily here, but if not, 
maybe https://github.com/ricochet2200/go-disk-usage would be of 
use.

Thanks,

John