- Fixed type mismatch in disk space calculation (int64 casting) - Created platform-specific disk space implementations: * diskspace_unix.go (Linux, macOS, FreeBSD) * diskspace_windows.go (Windows) * diskspace_bsd.go (OpenBSD) * diskspace_netbsd.go (NetBSD fallback) - All 10 platforms now compile successfully: ✅ Linux (amd64, arm64, armv7) ✅ macOS (Intel, Apple Silicon) ✅ Windows (amd64, arm64) ✅ FreeBSD, OpenBSD, NetBSD
12 lines
400 B
Go
12 lines
400 B
Go
// +build netbsd
|
|
|
|
package restore
|
|
|
|
// getDiskSpace returns available disk space in bytes (NetBSD fallback)
|
|
// NetBSD has different syscall interface, so we use a conservative estimate
|
|
func getDiskSpace(path string) (int64, error) {
|
|
// Return a large value to skip disk space check on NetBSD
|
|
// This is a fallback - restore will still work, just won't pre-check space
|
|
return 1 << 40, nil // 1 TB
|
|
}
|