mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
2180aa4f6f
pkg/archive contains code both invoked from cli (cross platform) and daemon (linux only) and Unix-specific dependencies break compilation on Windows. We extracted those stat-related funcs into platform specific implementations at pkg/system and added unit tests. Signed-off-by: Ahmet Alp Balkan <ahmetb@microsoft.com>
16 lines
251 B
Go
16 lines
251 B
Go
// +build !linux,!windows
|
|
|
|
package system
|
|
|
|
import (
|
|
"syscall"
|
|
)
|
|
|
|
func fromStatT(s *syscall.Stat_t) (*Stat, error) {
|
|
return &Stat{size: s.Size,
|
|
mode: uint32(s.Mode),
|
|
uid: s.Uid,
|
|
gid: s.Gid,
|
|
rdev: uint64(s.Rdev),
|
|
mtim: s.Mtimespec}, nil
|
|
}
|