summaryrefslogtreecommitdiff
path: root/libgo/go/syscall
diff options
context:
space:
mode:
authorIan Lance Taylor <ian@gcc.gnu.org>2019-04-19 14:20:16 +0000
committerIan Lance Taylor <ian@gcc.gnu.org>2019-04-19 14:20:16 +0000
commitf4488799b2827c9db0c13b356055f9bba0e315b6 (patch)
treef44a741b613534b6a228dfc0f5e1fbf52b60ce37 /libgo/go/syscall
parenta7bfaee58fea4f4b08e96bc3ba991a5fc164864c (diff)
downloadgcc-f4488799b2827c9db0c13b356055f9bba0e315b6.tar.gz
libgo/go/syscall: add SockAddrDatalink on AIX
This patch is required in order to build golang.org/x/net. The corresponding Go Toolchain patch is CL 170537. Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/172898 From-SVN: r270458
Diffstat (limited to 'libgo/go/syscall')
-rw-r--r--libgo/go/syscall/socket_aix.go24
1 files changed, 24 insertions, 0 deletions
diff --git a/libgo/go/syscall/socket_aix.go b/libgo/go/syscall/socket_aix.go
index 40cf42365e2..aaa1419fc9e 100644
--- a/libgo/go/syscall/socket_aix.go
+++ b/libgo/go/syscall/socket_aix.go
@@ -11,6 +11,7 @@ import "unsafe"
const SizeofSockaddrInet4 = 16
const SizeofSockaddrInet6 = 28
const SizeofSockaddrUnix = 1025
+const SizeofSockaddrDatalink = 128
type RawSockaddrInet4 struct {
Len uint8
@@ -87,3 +88,26 @@ func GetsockoptIPv6MTUInfo(fd, level, opt int) (*IPv6MTUInfo, error) {
err := getsockopt(fd, level, opt, unsafe.Pointer(&value), &vallen)
return &value, err
}
+
+type SockaddrDatalink struct {
+ Len uint8
+ Family uint8
+ Index uint16
+ Type uint8
+ Nlen uint8
+ Alen uint8
+ Slen uint8
+ Data [120]uint8
+ raw RawSockaddrDatalink
+}
+
+type RawSockaddrDatalink struct {
+ Len uint8
+ Family uint8
+ Index uint16
+ Type uint8
+ Nlen uint8
+ Alen uint8
+ Slen uint8
+ Data [120]uint8
+}