aboutsummaryrefslogtreecommitdiff
path: root/internal/syscallcompat/unix2syscall_linux.go
diff options
context:
space:
mode:
authorFelix Lechner2018-02-03 04:42:49 -0800
committerrfjakob2018-02-03 13:42:49 +0100
commit5b986288cf0139a612710de728e82192d1f63fa2 (patch)
tree4edcb82199ffec8cd313496c9d8d7b111f2e8cfe /internal/syscallcompat/unix2syscall_linux.go
parent866e8508420374929c918485ac7336dc2be3aee7 (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/syscallcompat/unix2syscall_linux.go')
-rw-r--r--internal/syscallcompat/unix2syscall_linux.go6
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)),
}
}