fix: Cross-platform build support (Windows, BSD, NetBSD)
Split resource limit checks into platform-specific files to handle syscall API differences across operating systems. Changes: - Created resources_unix.go (Linux, macOS, FreeBSD, OpenBSD) - Created resources_windows.go (Windows stub implementation) - Created disk_check_netbsd.go (NetBSD stub - syscall.Statfs unavailable) - Modified resources.go to delegate to checkPlatformLimits() - Fixed BSD syscall.Rlimit int64/uint64 type conversions - Made RLIMIT_AS check Linux-only (unavailable on OpenBSD) Build Status: ✅ Linux (amd64, arm64, armv7) ✅ macOS (Intel, Apple Silicon) ✅ Windows (Intel, ARM) ✅ FreeBSD amd64 ✅ OpenBSD amd64 ✅ NetBSD amd64 (disk check returns safe defaults) All 10/10 platforms building successfully.
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
//go:build openbsd || netbsd
|
||||
// +build openbsd netbsd
|
||||
//go:build openbsd
|
||||
// +build openbsd
|
||||
|
||||
package checks
|
||||
|
||||
|
||||
Reference in New Issue
Block a user