Ensure proper types for arguments to time.Unix.

When compiling for armv7, the type is `int32` for `Timespec.Sec` and
`Timespec.Nsec` in the syscall package. When passing these values
to `time.Unix`, the values must be converted to `int64`.

Signed-off-by: Kevin Swiber <kswiber@gmail.com>
This commit is contained in:
Kevin Swiber 2017-04-20 12:55:06 -07:00
parent 714ffdb51a
commit b365fbecfd

View File

@ -10,7 +10,7 @@ import (
func getStartTime(fi os.FileInfo) time.Time {
if st, ok := fi.Sys().(*syscall.Stat_t); ok {
return time.Unix(st.Ctim.Sec, st.Ctim.Nsec)
return time.Unix(int64(st.Ctim.Sec), int64(st.Ctim.Nsec))
}
return fi.ModTime()