diff options
author | Jakob Unterwurzacher | 2017-12-06 00:18:38 +0100 |
---|---|---|
committer | Jakob Unterwurzacher | 2017-12-06 00:18:38 +0100 |
commit | 6beb45e5b74aa465136687f00f2b5a51bee90395 (patch) | |
tree | 84078be23935d7fe9c62f91f8c78be70bd0e98ec /internal/syscallcompat/unix2syscall.go | |
parent | a3bdc2bf2b7b7ed34e2d68fc698e1dd136f2e67a (diff) |
syscallcompat: add Darwin version of unix2syscall
The "Atim" field is called "Atimespec" on Darwin,
same for Mtim and Ctim.
Diffstat (limited to 'internal/syscallcompat/unix2syscall.go')
-rw-r--r-- | internal/syscallcompat/unix2syscall.go | 28 |
1 files changed, 0 insertions, 28 deletions
diff --git a/internal/syscallcompat/unix2syscall.go b/internal/syscallcompat/unix2syscall.go deleted file mode 100644 index 3162025..0000000 --- a/internal/syscallcompat/unix2syscall.go +++ /dev/null @@ -1,28 +0,0 @@ -package syscallcompat - -import ( - "syscall" - - "golang.org/x/sys/unix" -) - -// Unix2syscall converts a unix.Stat_t struct to a syscall.Stat_t struct. -// A direct cast does not work because the padding is named differently in -// unix.Stat_t for some reason ("X__unused" in syscall, "_" in unix). -func Unix2syscall(u unix.Stat_t) syscall.Stat_t { - return syscall.Stat_t{ - Dev: u.Dev, - Ino: u.Ino, - Nlink: u.Nlink, - Mode: u.Mode, - Uid: u.Uid, - Gid: u.Gid, - Rdev: u.Rdev, - Size: u.Size, - Blksize: u.Blksize, - Blocks: u.Blocks, - Atim: syscall.Timespec(u.Atim), - Mtim: syscall.Timespec(u.Mtim), - Ctim: syscall.Timespec(u.Ctim), - } -} |