1
0
mirror of https://github.com/rclone/rclone.git synced 2026-01-06 18:43:50 +00:00

cmd/version: add support for openbsd/386

After this patch the version command will be fully
supported on openbsd/amd64 and openbsd/386.
Remaining os/arch combinations stay as is.
This commit is contained in:
Ivan Andreev
2021-09-02 00:38:53 +03:00
parent f1f923a986
commit aa0ceb6c5c
4 changed files with 5 additions and 27 deletions

View File

@@ -1,5 +1,4 @@
// +build !windows
// +build !openbsd !386
package buildinfo

View File

@@ -1,17 +0,0 @@
package buildinfo
// Skip building GetOSVersion on openbsd/386 because dependency
// https://github.com/shirou/gopsutil v3.21.6 fails to build on openbsd/386:
//
// Error: ../../../../go/pkg/mod/github.com/tklauser/go-sysconf@v0.3.6/sysconf_openbsd.go:22:28: undefined: unix.RLIMIT_NPROC
//
// Resolution pending on issues which can be resolved after go 1.17:
// - https://github.com/tklauser/go-sysconf/issues/21
// - https://golang.org/cl/341069
//
// Support for openbsd/386 can be restored after we deprecate go 1.17
// GetOSVersion on openbsd/386 returns stub OS version, kernel, bitness
func GetOSVersion() (osVersion, osKernel string) {
return "OpenBSD/i386", ""
}