From a4199c0bfe68a7d7de6e44cead3c91e7bd1e328d Mon Sep 17 00:00:00 2001 From: Benny Siegert Date: Sun, 2 Nov 2025 10:53:34 +0000 Subject: [PATCH] unix: fix definition of Statvfs_t for netbsd-arm. This will fix the test failure on the netbsd-arm builder, but it is not quite a real fix. struct statvfs changed between NetBSD 9 and NetBSD 10, with notably the "spare" member switching from [4]uint32 to [4]uint64. In addition, there is a new member at the end with label information, if available. The netbsd-arm builder runs on NetBSD 10, so it runs into an issue casting the binary data into a Statvfs_t with the wrong padding. I don't know why the issue does not happen on arm64. It does not happen on 386 and amd64 because these builders are running NetBSD 9 still. The real fix would be to use the statvfs90 compat syscall on NetBSD 10 and up, but not on 9 and below. Fixes golang/go#76097. Change-Id: I57ce6651d0ba05027a9fb29ee84c72a5225bcd67 Reviewed-on: https://go-review.googlesource.com/c/sys/+/717100 Run-TryBot: Benny Siegert TryBot-Result: Gopher Robot Reviewed-by: Michael Knyszek Reviewed-by: Tobias Klauser LUCI-TryBot-Result: Go LUCI --- unix/ztypes_netbsd_arm.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/unix/ztypes_netbsd_arm.go b/unix/ztypes_netbsd_arm.go index 439548ec..50e8e644 100644 --- a/unix/ztypes_netbsd_arm.go +++ b/unix/ztypes_netbsd_arm.go @@ -104,7 +104,7 @@ type Statvfs_t struct { Fsid uint32 Namemax uint32 Owner uint32 - Spare [4]uint32 + Spare [4]uint64 Fstypename [32]byte Mntonname [1024]byte Mntfromname [1024]byte