From b365fbecfd1e4275e22bb2b9c20b92b2878391d7 Mon Sep 17 00:00:00 2001 From: Kevin Swiber Date: Thu, 20 Apr 2017 12:55:06 -0700 Subject: [PATCH] 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 --- content/store_unix.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/store_unix.go b/content/store_unix.go index f79720dca..9d334c909 100644 --- a/content/store_unix.go +++ b/content/store_unix.go @@ -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()