1
0
Fork 0
mirror of https://github.com/restic/restic.git synced 2025-03-16 00:00:05 +01:00

Add freebsd to unixes.

Fix import.
Fix cast.
This commit is contained in:
klauspost 2015-08-12 15:20:26 +02:00
parent d8a512ccf6
commit 74dcdf3899

View file

@ -1,9 +1,13 @@
//
// +build dragonfly linux netbsd openbsd solaris darwin
// +build dragonfly linux netbsd openbsd freebsd solaris darwin
package restic
import (
"syscall"
)
var mknod = syscall.Mknod
type statUnix syscall.Stat_t
@ -12,7 +16,7 @@ func toStatT(i interface{}) (statT, bool) {
if i == nil {
return nil, false
}
s, ok := i.(syscall.Stat_t)
s, ok := i.(*syscall.Stat_t)
if ok && s != nil {
return statUnix(*s), true
}