// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-// +build linux dragonfly openbsd solaris
+// +build aix linux dragonfly openbsd solaris
package tar
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-// +build linux darwin dragonfly freebsd openbsd netbsd solaris
+// +build aix linux darwin dragonfly freebsd openbsd netbsd solaris
package tar
if h.Typeflag == TypeChar || h.Typeflag == TypeBlock {
dev := uint64(sys.Rdev) // May be int32 or uint32
switch runtime.GOOS {
+ case "aix":
+ var major, minor uint32
+ major = uint32((dev & 0x3fffffff00000000) >> 32)
+ minor = uint32((dev & 0x00000000ffffffff) >> 0)
+ h.Devmajor, h.Devminor = int64(major), int64(minor)
case "linux":
// Copied from golang.org/x/sys/unix/dev_linux.go.
major := uint32((dev & 0x00000000000fff00) >> 8)
SYS_FCNTL
)
+func (ts *StTimespec_t) Unix() (sec int64, nsec int64) {
+ return int64(ts.Sec), int64(ts.Nsec)
+}
+
+func (ts *StTimespec_t) Nano() int64 {
+ return int64(ts.Sec)*1e9 + int64(ts.Nsec)
+}
+
/*
* Wrapped
*/