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 ^
This commit is contained in:
parent
866e850842
commit
5b986288cf
@ -21,8 +21,8 @@ func Unix2syscall(u unix.Stat_t) syscall.Stat_t {
|
|||||||
Size: u.Size,
|
Size: u.Size,
|
||||||
Blksize: u.Blksize,
|
Blksize: u.Blksize,
|
||||||
Blocks: u.Blocks,
|
Blocks: u.Blocks,
|
||||||
Atim: syscall.Timespec(u.Atim),
|
Atim: syscall.NsecToTimespec(unix.TimespecToNsec(u.Atim)),
|
||||||
Mtim: syscall.Timespec(u.Mtim),
|
Mtim: syscall.NsecToTimespec(unix.TimespecToNsec(u.Mtim)),
|
||||||
Ctim: syscall.Timespec(u.Ctim),
|
Ctim: syscall.NsecToTimespec(unix.TimespecToNsec(u.Ctim)),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user