Fix casting on 32 bits (#19481)

Fix for the 32bits arch introduced by this change: https://github.com/gravitational/teleport/pull/19406/files#diff-a3a7eaca752e77262c79c696fd2e46062cd411b204295927dde865d1638c539c
This commit is contained in:
Jakub Nyckowski 2022-12-19 11:42:54 -05:00 committed by GitHub
parent ce7ac3d621
commit fc42dbb8df
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -24,9 +24,5 @@ import (
// Source: os/stat_linux.go
func GetAtime(fi os.FileInfo) time.Time {
return timespecToTime(fi.Sys().(*syscall.Stat_t).Atim)
}
func timespecToTime(ts syscall.Timespec) time.Time {
return time.Unix(ts.Sec, ts.Nsec)
return time.Unix(fi.Sys().(*syscall.Stat_t).Atim.Unix())
}