unix: code for AIX ppc and ppc64, for gccgo

Change-Id: I187edceaf3604d73110940bd5580fa127a85e87d
Reviewed-on: https://go-review.googlesource.com/129735
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Tobias Klauser <tobias.klauser@gmail.com>
diff --git a/unix/mmap_unix_test.go b/unix/mmap_unix_test.go
index 3258ca3..d4c4ef9 100644
--- a/unix/mmap_unix_test.go
+++ b/unix/mmap_unix_test.go
@@ -2,11 +2,12 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
-// +build darwin dragonfly freebsd linux netbsd openbsd solaris
+// +build aix darwin dragonfly freebsd linux netbsd openbsd solaris
 
 package unix_test
 
 import (
+	"runtime"
 	"testing"
 
 	"golang.org/x/sys/unix"
@@ -23,9 +24,14 @@
 
 	b[0] = 42
 
-	if err := unix.Msync(b, unix.MS_SYNC); err != nil {
-		t.Fatalf("Msync: %v", err)
+	if runtime.GOOS == "aix" {
+		t.Skip("msync returns invalid argument for AIX, skipping msync test")
+	} else {
+		if err := unix.Msync(b, unix.MS_SYNC); err != nil {
+			t.Fatalf("Msync: %v", err)
+		}
 	}
+
 	if err := unix.Madvise(b, unix.MADV_DONTNEED); err != nil {
 		t.Fatalf("Madvise: %v", err)
 	}