2
2
mirror of https://github.com/octoleo/restic.git synced 2024-12-26 20:30:19 +00:00
This commit is contained in:
greatroar 2020-05-24 19:32:19 +02:00 committed by Michael Eischer
parent 18531e3d6f
commit 3b09ae9074
5 changed files with 44 additions and 3 deletions

View File

@ -1,3 +1,5 @@
// +build aix solaris
package backend
import (

View File

@ -1,5 +1,4 @@
// +build !solaris
// +build !windows
// +build !aix,!solaris,!windows
package backend

View File

@ -0,0 +1,39 @@
// +build aix
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)
}
// AIX has a funny timespec type in syscall, with 32-bit nanoseconds.
// golang.org/x/sys/unix handles this cleanly, but we're stuck with syscall
// because os.Stat returns a syscall type in its os.FileInfo.Sys().
func toTimespec(t syscall.StTimespec_t) syscall.Timespec {
return syscall.Timespec{Sec: t.Sec, Nsec: int64(t.Nsec)}
}
func (s statT) atim() syscall.Timespec { return toTimespec(s.Atim) }
func (s statT) mtim() syscall.Timespec { return toTimespec(s.Mtim) }
func (s statT) ctim() syscall.Timespec { return toTimespec(s.Ctim) }
// Getxattr is a no-op on AIX.
func Getxattr(path, name string) ([]byte, error) {
return nil, nil
}
// Listxattr is a no-op on AIX.
func Listxattr(path string) ([]string, error) {
return nil, nil
}
// Setxattr is a no-op on AIX.
func Setxattr(path, name string, data []byte) error {
return nil
}

View File

@ -1,4 +1,4 @@
// +build linux solaris
// +build aix linux solaris
package progress

View File

@ -231,6 +231,7 @@ func (env *TravisEnvironment) Prepare() error {
"netbsd/386", "netbsd/amd64",
"linux/arm", "freebsd/arm",
"linux/ppc64le", "solaris/amd64",
"aix/ppc64",
}
} else {
env.goxOSArch = []string{runtime.GOOS + "/" + runtime.GOARCH}