diff --git a/internal/socket/cmsghdr_linux_32bit.go b/internal/socket/cmsghdr_linux_32bit.go index 623cf30f..4936e8a6 100644 --- a/internal/socket/cmsghdr_linux_32bit.go +++ b/internal/socket/cmsghdr_linux_32bit.go @@ -2,8 +2,8 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. -//go:build (arm || mips || mipsle || 386) && linux -// +build arm mips mipsle 386 +//go:build (arm || mips || mipsle || 386 || ppc) && linux +// +build arm mips mipsle 386 ppc // +build linux package socket diff --git a/internal/socket/iovec_32bit.go b/internal/socket/iovec_32bit.go index 1f42d034..2b8fbb3f 100644 --- a/internal/socket/iovec_32bit.go +++ b/internal/socket/iovec_32bit.go @@ -2,8 +2,8 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. -//go:build (arm || mips || mipsle || 386) && (darwin || dragonfly || freebsd || linux || netbsd || openbsd) -// +build arm mips mipsle 386 +//go:build (arm || mips || mipsle || 386 || ppc) && (darwin || dragonfly || freebsd || linux || netbsd || openbsd) +// +build arm mips mipsle 386 ppc // +build darwin dragonfly freebsd linux netbsd openbsd package socket diff --git a/internal/socket/msghdr_linux_32bit.go b/internal/socket/msghdr_linux_32bit.go index 2e09e266..b4658fba 100644 --- a/internal/socket/msghdr_linux_32bit.go +++ b/internal/socket/msghdr_linux_32bit.go @@ -2,8 +2,8 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. -//go:build (arm || mips || mipsle || 386) && linux -// +build arm mips mipsle 386 +//go:build (arm || mips || mipsle || 386 || ppc) && linux +// +build arm mips mipsle 386 ppc // +build linux package socket diff --git a/internal/socket/sys_linux_ppc.go b/internal/socket/sys_linux_ppc.go new file mode 100644 index 00000000..90cfaa9f --- /dev/null +++ b/internal/socket/sys_linux_ppc.go @@ -0,0 +1,10 @@ +// Copyright 2021 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. + +package socket + +const ( + sysRECVMMSG = 0x157 + sysSENDMMSG = 0x15d +) diff --git a/internal/socket/zsys_linux_ppc.go b/internal/socket/zsys_linux_ppc.go new file mode 100644 index 00000000..59b71da5 --- /dev/null +++ b/internal/socket/zsys_linux_ppc.go @@ -0,0 +1,35 @@ +// Code generated by cmd/cgo -godefs; DO NOT EDIT. +// cgo -godefs defs_linux.go + +package socket + +type iovec struct { + Base *byte + Len uint32 +} + +type msghdr struct { + Name *byte + Namelen uint32 + Iov *iovec + Iovlen uint32 + Control *byte + Controllen uint32 + Flags int32 +} + +type mmsghdr struct { + Hdr msghdr + Len uint32 +} + +type cmsghdr struct { + Len uint32 + Level int32 + Type int32 +} + +const ( + sizeofIovec = 0x8 + sizeofMsghdr = 0x1c +)