Merge pull request #2209 from restic/fix-freebsd

Fix build on FreeBSD for Go < 1.12
This commit is contained in:
Alexander Neumann 2019-03-17 11:05:38 +01:00
commit 5da4b0fc7d
2 changed files with 19 additions and 0 deletions

View File

@ -1,3 +1,5 @@
// +build freebsd,go1.12
package restic
import "syscall"

View File

@ -0,0 +1,17 @@
// +build freebsd,!go1.12
package restic
import "syscall"
func (node Node) restoreSymlinkTimestamps(path string, utimes [2]syscall.Timespec) error {
return nil
}
func (node Node) device() int {
return int(node.Device)
}
func (s statUnix) atim() syscall.Timespec { return s.Atimespec }
func (s statUnix) mtim() syscall.Timespec { return s.Mtimespec }
func (s statUnix) ctim() syscall.Timespec { return s.Ctimespec }