From c37a5eba8c5a8a4c40a5e5d41590fb0566d6708d Mon Sep 17 00:00:00 2001 From: Lomanic <5020919+Lomanic@users.noreply.github.com> Date: Wed, 9 Oct 2024 00:14:19 +0200 Subject: [PATCH 1/2] [cpu][netbsd] Fix "undefined: cpuTimes" error at compile time on arm Fixes #1645 --- cpu/cpu_netbsd_arm.go | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 cpu/cpu_netbsd_arm.go diff --git a/cpu/cpu_netbsd_arm.go b/cpu/cpu_netbsd_arm.go new file mode 100644 index 000000000..e4799bcf5 --- /dev/null +++ b/cpu/cpu_netbsd_arm.go @@ -0,0 +1,10 @@ +// SPDX-License-Identifier: BSD-3-Clause +package cpu + +type cpuTimes struct { + User uint32 + Nice uint32 + Sys uint32 + Intr uint32 + Idle uint32 +} From ec973203e984456890ac13a570e8e303884bbdcd Mon Sep 17 00:00:00 2001 From: Lomanic <5020919+Lomanic@users.noreply.github.com> Date: Wed, 9 Oct 2024 00:17:20 +0200 Subject: [PATCH 2/2] [disk][netbsd] Generate cpu_netbsd_arm.go via mktypes.sh --- disk/disk_netbsd_arm.go | 46 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 disk/disk_netbsd_arm.go diff --git a/disk/disk_netbsd_arm.go b/disk/disk_netbsd_arm.go new file mode 100644 index 000000000..96ae40716 --- /dev/null +++ b/disk/disk_netbsd_arm.go @@ -0,0 +1,46 @@ +//go:build netbsd && arm +// +build netbsd,arm + +// Code generated by cmd/cgo -godefs; DO NOT EDIT. +// cgo -godefs disk/types_netbsd.go + +package disk + +const ( + sizeOfStatvfs = 0xcc8 +) + +type ( + Statvfs struct { + Flag uint32 + Bsize uint32 + Frsize uint32 + Iosize uint32 + Blocks uint64 + Bfree uint64 + Bavail uint64 + Bresvd uint64 + Files uint64 + Ffree uint64 + Favail uint64 + Fresvd uint64 + Syncreads uint64 + Syncwrites uint64 + Asyncreads uint64 + Asyncwrites uint64 + Fsidx _Ctype_struct___0 + Fsid uint32 + Namemax uint32 + Owner uint32 + Pad_cgo_0 [4]byte + Spare [4]uint64 + Fstypename [32]uint8 + Mntonname [1024]uint8 + Mntfromname [1024]uint8 + Mntfromlabel [1024]uint8 + } +) + +type _Ctype_struct___0 struct { + FsidVal [2]int32 +}