mirror of
https://github.com/restic/restic.git
synced 2024-12-23 00:07:25 +00:00
AIX port
This commit is contained in:
parent
18531e3d6f
commit
3b09ae9074
5 changed files with 44 additions and 3 deletions
|
@ -1,3 +1,5 @@
|
|||
// +build aix solaris
|
||||
|
||||
package backend
|
||||
|
||||
import (
|
|
@ -1,5 +1,4 @@
|
|||
// +build !solaris
|
||||
// +build !windows
|
||||
// +build !aix,!solaris,!windows
|
||||
|
||||
package backend
|
||||
|
||||
|
|
39
internal/restic/node_aix.go
Normal file
39
internal/restic/node_aix.go
Normal 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
|
||||
}
|
|
@ -1,4 +1,4 @@
|
|||
// +build linux solaris
|
||||
// +build aix linux solaris
|
||||
|
||||
package progress
|
||||
|
||||
|
|
|
@ -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}
|
||||
|
|
Loading…
Reference in a new issue