Skip to content

Commit

Permalink
internal/backend: support OpenBSD to get file status last changed info (
Browse files Browse the repository at this point in the history
#1858)

* internal/backend: support OpenBSD for getting file status last changed info

* Add OpenBSD to list of cross-compile OS list
  • Loading branch information
tuftedocelot authored Jan 3, 2025
1 parent 483afd6 commit 6fcb3c9
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
1 change: 1 addition & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ jobs:
- darwin
- freebsd
- linux
- openbsd
- windows
goarch:
- amd64
Expand Down
15 changes: 15 additions & 0 deletions internal/backend/time_openbsd.go
Original file line number Diff line number Diff line change
@@ -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{}
}

0 comments on commit 6fcb3c9

Please sign in to comment.