host: fix darwin build — Statfs Bsize is uint32 there, cast before multiplying
int64(st.Bavail) * st.Bsize compiles on linux (Bsize is int64) but is a type-mismatch compile error on darwin (Bsize is uint32), breaking `go build ./...` for anyone building the CLI on a Mac. Reported by the cribado-dmarc team while rebuilding carlos from main (cribado/cribado-dmarc#5).
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
1 file changed,
+1
−1
internal/host/probes.go+1 −1
diff --git a/internal/host/probes.go b/internal/host/probes.go| index 1e3bd5d64..6a64ce1c4 100644 |
| --- a/internal/host/probes.go |
| +++ b/internal/host/probes.go |
| @@ -317,6 +317,6 @@ func readDiskFreeBytes() *int64 { |
| if st.Blocks == 0 { |
| return nil |
| } |
| - freeBytes := int64(st.Bavail) * st.Bsize |
| + freeBytes := int64(st.Bavail) * int64(st.Bsize) |
| return &freeBytes |
| } |