unix: remove StTimespec type on AIX

On AIX, Stat_t's fields dealing with time are of type StTimespec while
all other GOOS are using Timespec.
StTimespec and Timespec are the same on ppc but not in ppc64. Therefore,
values returned by ppc64 syscalls need to be adjusted in order to
allow the use of Timespec instead of StTimespec.

Fixes golang/go#32073

Change-Id: I0c212bf1741a27c49e995bf928d4941b6d583e54
Reviewed-on: https://go-review.googlesource.com/c/sys/+/177838
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
This commit is contained in:
Clément Chigot
2019-05-20 16:14:52 +00:00
committed by Brad Fitzpatrick
parent 61b9204099
commit ad400b1274
13 changed files with 97 additions and 40 deletions
+1 -1
View File
@@ -62,7 +62,7 @@ func TestUname(t *testing.T) {
// Test that this compiles. (Issue #31735)
func TestStatFieldNames(t *testing.T) {
var st unix.Stat_t
var ts interface{} // either *unix.Timespec or *unix.StTimespec on GOOS==aix
var ts *unix.Timespec
ts = &st.Atim
ts = &st.Mtim
ts = &st.Ctim