mirror of
https://github.com/containers/podman.git
synced 2025-12-09 07:09:03 +08:00
Mainly to pull in fixes for #1382 which is impossible to reproduce locally so let's optimistically mark it as fixed and reopen if needed in the future. Fixes: #1382 Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
23 lines
392 B
Go
23 lines
392 B
Go
package system
|
|
|
|
import (
|
|
"syscall"
|
|
"time"
|
|
"unsafe"
|
|
)
|
|
|
|
// maxTime is used by chtimes.
|
|
var maxTime time.Time
|
|
|
|
func init() {
|
|
// chtimes initialization
|
|
if unsafe.Sizeof(syscall.Timespec{}.Nsec) == 8 {
|
|
// This is a 64 bit timespec
|
|
// os.Chtimes limits time to the following
|
|
maxTime = time.Unix(0, 1<<63-1)
|
|
} else {
|
|
// This is a 32 bit timespec
|
|
maxTime = time.Unix(1<<31-1, 0)
|
|
}
|
|
}
|