-
Notifications
You must be signed in to change notification settings - Fork 217
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
internal/backend: support OpenBSD to get file status last changed info (
#1858) * internal/backend: support OpenBSD for getting file status last changed info * Add OpenBSD to list of cross-compile OS list
- Loading branch information
1 parent
483afd6
commit 6fcb3c9
Showing
2 changed files
with
16 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -20,6 +20,7 @@ jobs: | |
- darwin | ||
- freebsd | ||
- linux | ||
- openbsd | ||
- windows | ||
goarch: | ||
- amd64 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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{} | ||
} |