From 0660108e3e06c9d935f27561eea78d892ba7b3e3 Mon Sep 17 00:00:00 2001 From: "W. Trevor King" Date: Fri, 6 Jul 2018 09:37:35 -0700 Subject: ctime: Drop 32-/64-bit distinction on Linux We added the explicit int64 casts for 32-bit builds in 35e1ad78 (Make libpod build on 32-bit systems, 2018-02-12, #324), but the explicit casts work fine on 64-bit systems too. Signed-off-by: W. Trevor King Closes: #1058 Approved by: mheon --- pkg/ctime/ctime_linux.go | 14 ++++++++++++++ pkg/ctime/ctime_linux_32.go | 14 -------------- pkg/ctime/ctime_linux_64.go | 14 -------------- 3 files changed, 14 insertions(+), 28 deletions(-) create mode 100644 pkg/ctime/ctime_linux.go delete mode 100644 pkg/ctime/ctime_linux_32.go delete mode 100644 pkg/ctime/ctime_linux_64.go diff --git a/pkg/ctime/ctime_linux.go b/pkg/ctime/ctime_linux.go new file mode 100644 index 000000000..e83269d49 --- /dev/null +++ b/pkg/ctime/ctime_linux.go @@ -0,0 +1,14 @@ +// +build linux + +package ctime + +import ( + "os" + "syscall" + "time" +) + +func created(fi os.FileInfo) time.Time { + st := fi.Sys().(*syscall.Stat_t) + return time.Unix(int64(st.Ctim.Sec), int64(st.Ctim.Nsec)) +} diff --git a/pkg/ctime/ctime_linux_32.go b/pkg/ctime/ctime_linux_32.go deleted file mode 100644 index 00c1a9a8e..000000000 --- a/pkg/ctime/ctime_linux_32.go +++ /dev/null @@ -1,14 +0,0 @@ -// +build arm,linux 386,linux - -package ctime - -import ( - "os" - "syscall" - "time" -) - -func created(fi os.FileInfo) time.Time { - st := fi.Sys().(*syscall.Stat_t) - return time.Unix(int64(st.Ctim.Sec), int64(st.Ctim.Nsec)) -} diff --git a/pkg/ctime/ctime_linux_64.go b/pkg/ctime/ctime_linux_64.go deleted file mode 100644 index 1251c1ded..000000000 --- a/pkg/ctime/ctime_linux_64.go +++ /dev/null @@ -1,14 +0,0 @@ -// +build !arm,!386,linux - -package ctime - -import ( - "os" - "syscall" - "time" -) - -func created(fi os.FileInfo) time.Time { - st := fi.Sys().(*syscall.Stat_t) - return time.Unix(st.Ctim.Sec, st.Ctim.Nsec) -} -- cgit v1.2.3-54-g00ecf