diff options
author | Felix Lechner | 2018-02-03 04:42:49 -0800 |
---|---|---|
committer | rfjakob | 2018-02-03 13:42:49 +0100 |
commit | 5b986288cf0139a612710de728e82192d1f63fa2 (patch) | |
tree | 4edcb82199ffec8cd313496c9d8d7b111f2e8cfe /internal | |
parent | 866e8508420374929c918485ac7336dc2be3aee7 (diff) |
Fix assignment error in Unix2syscall by converting Timespec into Nsec (#203)
$ go.gcc build
# github.com/rfjakob/gocryptfs/internal/syscallcompat
internal/syscallcompat/unix2syscall_linux.go:32:13: error: incompatible types in assignment (cannot use type int64 as type syscall.Timespec_sec_t)
s.Atim.Sec = u.Atim.Sec
^
Diffstat (limited to 'internal')
-rw-r--r-- | internal/syscallcompat/unix2syscall_linux.go | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/internal/syscallcompat/unix2syscall_linux.go b/internal/syscallcompat/unix2syscall_linux.go index 3162025..87ac522 100644 --- a/internal/syscallcompat/unix2syscall_linux.go +++ b/internal/syscallcompat/unix2syscall_linux.go @@ -21,8 +21,8 @@ func Unix2syscall(u unix.Stat_t) syscall.Stat_t { Size: u.Size, Blksize: u.Blksize, Blocks: u.Blocks, - Atim: syscall.Timespec(u.Atim), - Mtim: syscall.Timespec(u.Mtim), - Ctim: syscall.Timespec(u.Ctim), + Atim: syscall.NsecToTimespec(unix.TimespecToNsec(u.Atim)), + Mtim: syscall.NsecToTimespec(unix.TimespecToNsec(u.Mtim)), + Ctim: syscall.NsecToTimespec(unix.TimespecToNsec(u.Ctim)), } } |