diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 2cb7ad3e5b..52c2a33704 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -20,6 +20,7 @@ jobs: - darwin - freebsd - linux + - openbsd - windows goarch: - amd64 diff --git a/internal/backend/time_openbsd.go b/internal/backend/time_openbsd.go new file mode 100644 index 0000000000..15076c2d7d --- /dev/null +++ b/internal/backend/time_openbsd.go @@ -0,0 +1,15 @@ +//go:build openbsd + +package backend + +import ( + "os" + "syscall" +) + +func createTimeFromFileInfo(input os.FileInfo) syscall.Timespec { + if statT, ok := input.Sys().(*syscall.Stat_t); ok { + return statT.Ctim + } + return syscall.Timespec{} +}