syscall: fix TestForeground for AIX
authorClément Chigot <clement.chigot@atos.net>
Fri, 3 May 2019 14:53:13 +0000 (16:53 +0200)
committerIan Lance Taylor <iant@golang.org>
Wed, 23 Sep 2020 03:07:34 +0000 (20:07 -0700)
Syscall function can't be used on AIX. Therefore, Ioctl in
TestForeground must call raw_ioctl.

Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/175080

gcc/go/gofrontend/MERGE
libgo/go/syscall/export_aix_test.go [new file with mode: 0644]
libgo/go/syscall/export_unix_test.go

index 59b580f..5d26b7e 100644 (file)
@@ -1,4 +1,4 @@
-99ab98d2ed8fa8a33947c52925f89b344d7cb8ae
+cfee06e20a172753552b1515dd3a4fde5d5cad7b
 
 The first line of this file holds the git revision number of the last
 merge done from the gofrontend repository.
diff --git a/libgo/go/syscall/export_aix_test.go b/libgo/go/syscall/export_aix_test.go
new file mode 100644 (file)
index 0000000..044337b
--- /dev/null
@@ -0,0 +1,16 @@
+// Copyright 2019 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// +build aix
+
+package syscall
+
+import (
+       "unsafe"
+)
+
+func Ioctl(fd, req, arg uintptr) (err Errno) {
+       _, err = raw_ioctl_ptr(int(fd), req, unsafe.Pointer(arg))
+       return err
+}
index dc11f45..4d67be9 100644 (file)
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
-// +build aix darwin dragonfly freebsd hurd linux netbsd openbsd solaris
+// +build darwin dragonfly freebsd hurd linux netbsd openbsd solaris
 
 package syscall