Commit 6b8e230012

6b8e23001283acb95d10c275155e9cb83b15f598

parent: 8a52a60b14

Verified · cmc

cmc <hello@cleberg.net> · 2026-07-15 01:21 UTC

build: fix build on darwin

macOS names the stat ctime field Ctimespec rather than Ctim, so stat.go
failed to compile on a Mac. Split the darwin case into its own file and
exclude darwin from the generic variant. Deploys are unaffected.

Layout: unified · split

app/stat-darwin.go added +15
@@ -0,0 +1,15 @@
1//go:build darwin
2// +build darwin
3
4package app
5
6import (
7 "syscall"
8 "time"
9)
10
11// macOS names the ctime field Ctimespec rather than Ctim, so it needs its own
12// variant to let the project build and test on a Mac (deploys are Linux).
13func statTime(stat *syscall.Stat_t) int64 {
14 return time.Unix(stat.Ctimespec.Unix()).UnixMilli()
15}
app/stat.go +2 −2
@@ -1,5 +1,5 @@
1//go:build !freebsd 1//go:build !freebsd && !darwin
2// +build !freebsd 2// +build !freebsd,!darwin
3 3
4package app 4package app
5 5