From 5b986288cf0139a612710de728e82192d1f63fa2 Mon Sep 17 00:00:00 2001 From: Felix Lechner Date: Sat, 3 Feb 2018 04:42:49 -0800 Subject: 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 ^--- internal/syscallcompat/unix2syscall_linux.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'internal') 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)), } } -- cgit v1.2.3