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:
parent
714ffdb51a
commit
b365fbecfd
@ -10,7 +10,7 @@ import (
|
|||||||
|
|
||||||
func getStartTime(fi os.FileInfo) time.Time {
|
func getStartTime(fi os.FileInfo) time.Time {
|
||||||
if st, ok := fi.Sys().(*syscall.Stat_t); ok {
|
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()
|
return fi.ModTime()
|
||||||
|
Loading…
Reference in New Issue
Block a user