all: go fmt ./...

Make all our package sources use Go 1.17 gofmt format
(adding //go:build lines).

Not strictly necessary but will avoid spurious changes
as files are edited.

Part of //go:build change (#41184).
See https://golang.org/design/draft-gobuild

Change-Id: I5b2b7d93424e828a3c5f76ae3f30ab825aca388e
Reviewed-on: https://go-review.googlesource.com/c/net/+/294371
Trust: Russ Cox <rsc@golang.org>
Run-TryBot: Russ Cox <rsc@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Jason A. Donenfeld <Jason@zx2c4.com>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
diff --git a/internal/iana/gen.go b/internal/iana/gen.go
index 2a7661c..34f0f7e 100644
--- a/internal/iana/gen.go
+++ b/internal/iana/gen.go
@@ -2,6 +2,7 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
+//go:build ignore
 // +build ignore
 
 //go:generate go run gen.go
diff --git a/internal/socket/cmsghdr.go b/internal/socket/cmsghdr.go
index 0cde35a..4bdaaaf 100644
--- a/internal/socket/cmsghdr.go
+++ b/internal/socket/cmsghdr.go
@@ -2,6 +2,7 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
+//go:build aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris || zos
 // +build aix darwin dragonfly freebsd linux netbsd openbsd solaris zos
 
 package socket
diff --git a/internal/socket/cmsghdr_bsd.go b/internal/socket/cmsghdr_bsd.go
index 14dbb3a..0d30e0a 100644
--- a/internal/socket/cmsghdr_bsd.go
+++ b/internal/socket/cmsghdr_bsd.go
@@ -2,6 +2,7 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
+//go:build aix || darwin || dragonfly || freebsd || netbsd || openbsd
 // +build aix darwin dragonfly freebsd netbsd openbsd
 
 package socket
diff --git a/internal/socket/cmsghdr_linux_32bit.go b/internal/socket/cmsghdr_linux_32bit.go
index bac6681..623cf30 100644
--- a/internal/socket/cmsghdr_linux_32bit.go
+++ b/internal/socket/cmsghdr_linux_32bit.go
@@ -2,6 +2,7 @@
 // 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
 // +build linux
 
diff --git a/internal/socket/cmsghdr_linux_64bit.go b/internal/socket/cmsghdr_linux_64bit.go
index 27be0ef..1ba4310 100644
--- a/internal/socket/cmsghdr_linux_64bit.go
+++ b/internal/socket/cmsghdr_linux_64bit.go
@@ -2,6 +2,7 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
+//go:build (arm64 || amd64 || ppc64 || ppc64le || mips64 || mips64le || riscv64 || s390x) && linux
 // +build arm64 amd64 ppc64 ppc64le mips64 mips64le riscv64 s390x
 // +build linux
 
diff --git a/internal/socket/cmsghdr_solaris_64bit.go b/internal/socket/cmsghdr_solaris_64bit.go
index 7dedd43..d3dbe1b 100644
--- a/internal/socket/cmsghdr_solaris_64bit.go
+++ b/internal/socket/cmsghdr_solaris_64bit.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.
 
-// +build amd64
-// +build solaris
+//go:build amd64 && solaris
+// +build amd64,solaris
 
 package socket
 
diff --git a/internal/socket/cmsghdr_stub.go b/internal/socket/cmsghdr_stub.go
index 83c35ec..1d9f2ed 100644
--- a/internal/socket/cmsghdr_stub.go
+++ b/internal/socket/cmsghdr_stub.go
@@ -2,6 +2,7 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
+//go:build !aix && !darwin && !dragonfly && !freebsd && !linux && !netbsd && !openbsd && !solaris && !zos
 // +build !aix,!darwin,!dragonfly,!freebsd,!linux,!netbsd,!openbsd,!solaris,!zos
 
 package socket
diff --git a/internal/socket/cmsghdr_unix.go b/internal/socket/cmsghdr_unix.go
index c2b2b65..aa1b062 100644
--- a/internal/socket/cmsghdr_unix.go
+++ b/internal/socket/cmsghdr_unix.go
@@ -2,6 +2,7 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
+//go:build aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris
 // +build aix darwin dragonfly freebsd linux netbsd openbsd solaris
 
 package socket
diff --git a/internal/socket/defs_aix.go b/internal/socket/defs_aix.go
index 90090d0..e6dea40 100644
--- a/internal/socket/defs_aix.go
+++ b/internal/socket/defs_aix.go
@@ -2,6 +2,7 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
+//go:build ignore
 // +build ignore
 
 // +godefs map struct_in_addr [4]byte /* in_addr */
diff --git a/internal/socket/defs_darwin.go b/internal/socket/defs_darwin.go
index ffb6d8e..b78b114 100644
--- a/internal/socket/defs_darwin.go
+++ b/internal/socket/defs_darwin.go
@@ -2,6 +2,7 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
+//go:build ignore
 // +build ignore
 
 // +godefs map struct_in_addr [4]byte /* in_addr */
diff --git a/internal/socket/defs_dragonfly.go b/internal/socket/defs_dragonfly.go
index ffb6d8e..b78b114 100644
--- a/internal/socket/defs_dragonfly.go
+++ b/internal/socket/defs_dragonfly.go
@@ -2,6 +2,7 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
+//go:build ignore
 // +build ignore
 
 // +godefs map struct_in_addr [4]byte /* in_addr */
diff --git a/internal/socket/defs_freebsd.go b/internal/socket/defs_freebsd.go
index ffb6d8e..b78b114 100644
--- a/internal/socket/defs_freebsd.go
+++ b/internal/socket/defs_freebsd.go
@@ -2,6 +2,7 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
+//go:build ignore
 // +build ignore
 
 // +godefs map struct_in_addr [4]byte /* in_addr */
diff --git a/internal/socket/defs_linux.go b/internal/socket/defs_linux.go
index 3582439..9b7cb5d 100644
--- a/internal/socket/defs_linux.go
+++ b/internal/socket/defs_linux.go
@@ -2,6 +2,7 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
+//go:build ignore
 // +build ignore
 
 // +godefs map struct_in_addr [4]byte /* in_addr */
diff --git a/internal/socket/defs_netbsd.go b/internal/socket/defs_netbsd.go
index 379e157..5b59cdc 100644
--- a/internal/socket/defs_netbsd.go
+++ b/internal/socket/defs_netbsd.go
@@ -2,6 +2,7 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
+//go:build ignore
 // +build ignore
 
 // +godefs map struct_in_addr [4]byte /* in_addr */
diff --git a/internal/socket/defs_openbsd.go b/internal/socket/defs_openbsd.go
index ffb6d8e..b78b114 100644
--- a/internal/socket/defs_openbsd.go
+++ b/internal/socket/defs_openbsd.go
@@ -2,6 +2,7 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
+//go:build ignore
 // +build ignore
 
 // +godefs map struct_in_addr [4]byte /* in_addr */
diff --git a/internal/socket/defs_solaris.go b/internal/socket/defs_solaris.go
index ffb6d8e..b78b114 100644
--- a/internal/socket/defs_solaris.go
+++ b/internal/socket/defs_solaris.go
@@ -2,6 +2,7 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
+//go:build ignore
 // +build ignore
 
 // +godefs map struct_in_addr [4]byte /* in_addr */
diff --git a/internal/socket/error_unix.go b/internal/socket/error_unix.go
index 47f0d6e..78f4129 100644
--- a/internal/socket/error_unix.go
+++ b/internal/socket/error_unix.go
@@ -2,6 +2,7 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
+//go:build aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris || zos
 // +build aix darwin dragonfly freebsd linux netbsd openbsd solaris zos
 
 package socket
diff --git a/internal/socket/iovec_32bit.go b/internal/socket/iovec_32bit.go
index 05d6082..1f42d03 100644
--- a/internal/socket/iovec_32bit.go
+++ b/internal/socket/iovec_32bit.go
@@ -2,6 +2,7 @@
 // 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
 // +build darwin dragonfly freebsd linux netbsd openbsd
 
diff --git a/internal/socket/iovec_64bit.go b/internal/socket/iovec_64bit.go
index 0309e10..3dc5def 100644
--- a/internal/socket/iovec_64bit.go
+++ b/internal/socket/iovec_64bit.go
@@ -2,6 +2,7 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
+//go:build (arm64 || amd64 || ppc64 || ppc64le || mips64 || mips64le || riscv64 || s390x) && (aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || zos)
 // +build arm64 amd64 ppc64 ppc64le mips64 mips64le riscv64 s390x
 // +build aix darwin dragonfly freebsd linux netbsd openbsd zos
 
diff --git a/internal/socket/iovec_solaris_64bit.go b/internal/socket/iovec_solaris_64bit.go
index 8d17a40..f7da2bc 100644
--- a/internal/socket/iovec_solaris_64bit.go
+++ b/internal/socket/iovec_solaris_64bit.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.
 
-// +build amd64
-// +build solaris
+//go:build amd64 && solaris
+// +build amd64,solaris
 
 package socket
 
diff --git a/internal/socket/iovec_stub.go b/internal/socket/iovec_stub.go
index f44d4f5..14caf52 100644
--- a/internal/socket/iovec_stub.go
+++ b/internal/socket/iovec_stub.go
@@ -2,6 +2,7 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
+//go:build !aix && !darwin && !dragonfly && !freebsd && !linux && !netbsd && !openbsd && !solaris && !zos
 // +build !aix,!darwin,!dragonfly,!freebsd,!linux,!netbsd,!openbsd,!solaris,!zos
 
 package socket
diff --git a/internal/socket/mmsghdr_stub.go b/internal/socket/mmsghdr_stub.go
index 1a7f279..113e773 100644
--- a/internal/socket/mmsghdr_stub.go
+++ b/internal/socket/mmsghdr_stub.go
@@ -2,6 +2,7 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
+//go:build !aix && !linux && !netbsd
 // +build !aix,!linux,!netbsd
 
 package socket
diff --git a/internal/socket/mmsghdr_unix.go b/internal/socket/mmsghdr_unix.go
index f110068..5025a0f 100644
--- a/internal/socket/mmsghdr_unix.go
+++ b/internal/socket/mmsghdr_unix.go
@@ -2,6 +2,7 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
+//go:build aix || linux || netbsd
 // +build aix linux netbsd
 
 package socket
diff --git a/internal/socket/msghdr_bsd.go b/internal/socket/msghdr_bsd.go
index 77f44c1..25f6847 100644
--- a/internal/socket/msghdr_bsd.go
+++ b/internal/socket/msghdr_bsd.go
@@ -2,6 +2,7 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
+//go:build aix || darwin || dragonfly || freebsd || netbsd || openbsd
 // +build aix darwin dragonfly freebsd netbsd openbsd
 
 package socket
diff --git a/internal/socket/msghdr_bsdvar.go b/internal/socket/msghdr_bsdvar.go
index c5562dd..5b8e00f 100644
--- a/internal/socket/msghdr_bsdvar.go
+++ b/internal/socket/msghdr_bsdvar.go
@@ -2,6 +2,7 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
+//go:build aix || darwin || dragonfly || freebsd || netbsd
 // +build aix darwin dragonfly freebsd netbsd
 
 package socket
diff --git a/internal/socket/msghdr_linux_32bit.go b/internal/socket/msghdr_linux_32bit.go
index a7a5987..2e09e26 100644
--- a/internal/socket/msghdr_linux_32bit.go
+++ b/internal/socket/msghdr_linux_32bit.go
@@ -2,6 +2,7 @@
 // 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
 // +build linux
 
diff --git a/internal/socket/msghdr_linux_64bit.go b/internal/socket/msghdr_linux_64bit.go
index e731833..c9c592d 100644
--- a/internal/socket/msghdr_linux_64bit.go
+++ b/internal/socket/msghdr_linux_64bit.go
@@ -2,6 +2,7 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
+//go:build (arm64 || amd64 || ppc64 || ppc64le || mips64 || mips64le || riscv64 || s390x) && linux
 // +build arm64 amd64 ppc64 ppc64le mips64 mips64le riscv64 s390x
 // +build linux
 
diff --git a/internal/socket/msghdr_solaris_64bit.go b/internal/socket/msghdr_solaris_64bit.go
index 6465b20..3098f5d 100644
--- a/internal/socket/msghdr_solaris_64bit.go
+++ b/internal/socket/msghdr_solaris_64bit.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.
 
-// +build amd64
-// +build solaris
+//go:build amd64 && solaris
+// +build amd64,solaris
 
 package socket
 
diff --git a/internal/socket/msghdr_stub.go b/internal/socket/msghdr_stub.go
index 1a253d2..eb79151 100644
--- a/internal/socket/msghdr_stub.go
+++ b/internal/socket/msghdr_stub.go
@@ -2,6 +2,7 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
+//go:build !aix && !darwin && !dragonfly && !freebsd && !linux && !netbsd && !openbsd && !solaris && !zos
 // +build !aix,!darwin,!dragonfly,!freebsd,!linux,!netbsd,!openbsd,!solaris,!zos
 
 package socket
diff --git a/internal/socket/msghdr_zos_s390x.go b/internal/socket/msghdr_zos_s390x.go
index eb1a99a..324e9ee 100644
--- a/internal/socket/msghdr_zos_s390x.go
+++ b/internal/socket/msghdr_zos_s390x.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.
 
-// +build s390x
-// +build zos
+//go:build s390x && zos
+// +build s390x,zos
 
 package socket
 
diff --git a/internal/socket/norace.go b/internal/socket/norace.go
index 9519ffb..de0ad42 100644
--- a/internal/socket/norace.go
+++ b/internal/socket/norace.go
@@ -2,6 +2,7 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
+//go:build !race
 // +build !race
 
 package socket
diff --git a/internal/socket/race.go b/internal/socket/race.go
index df60c62..f0a28a6 100644
--- a/internal/socket/race.go
+++ b/internal/socket/race.go
@@ -2,6 +2,7 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
+//go:build race
 // +build race
 
 package socket
diff --git a/internal/socket/rawconn_mmsg.go b/internal/socket/rawconn_mmsg.go
index d01fc4c..5d90de1 100644
--- a/internal/socket/rawconn_mmsg.go
+++ b/internal/socket/rawconn_mmsg.go
@@ -2,6 +2,7 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
+//go:build linux
 // +build linux
 
 package socket
diff --git a/internal/socket/rawconn_msg.go b/internal/socket/rawconn_msg.go
index 610b1a1..1c55cb2 100644
--- a/internal/socket/rawconn_msg.go
+++ b/internal/socket/rawconn_msg.go
@@ -2,6 +2,7 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
+//go:build aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris || windows || zos
 // +build aix darwin dragonfly freebsd linux netbsd openbsd solaris windows zos
 
 package socket
diff --git a/internal/socket/rawconn_nommsg.go b/internal/socket/rawconn_nommsg.go
index fe5bb94..02f3285 100644
--- a/internal/socket/rawconn_nommsg.go
+++ b/internal/socket/rawconn_nommsg.go
@@ -2,6 +2,7 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
+//go:build !linux
 // +build !linux
 
 package socket
diff --git a/internal/socket/rawconn_nomsg.go b/internal/socket/rawconn_nomsg.go
index e51b60d..dd78587 100644
--- a/internal/socket/rawconn_nomsg.go
+++ b/internal/socket/rawconn_nomsg.go
@@ -2,6 +2,7 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
+//go:build !aix && !darwin && !dragonfly && !freebsd && !linux && !netbsd && !openbsd && !solaris && !windows && !zos
 // +build !aix,!darwin,!dragonfly,!freebsd,!linux,!netbsd,!openbsd,!solaris,!windows,!zos
 
 package socket
diff --git a/internal/socket/socket_test.go b/internal/socket/socket_test.go
index 8952c22..e223999 100644
--- a/internal/socket/socket_test.go
+++ b/internal/socket/socket_test.go
@@ -2,6 +2,7 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
+//go:build aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris || windows || zos
 // +build aix darwin dragonfly freebsd linux netbsd openbsd solaris windows zos
 
 package socket_test
diff --git a/internal/socket/sys_bsd.go b/internal/socket/sys_bsd.go
index d432835..b6cd770 100644
--- a/internal/socket/sys_bsd.go
+++ b/internal/socket/sys_bsd.go
@@ -2,6 +2,7 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
+//go:build aix || darwin || dragonfly || freebsd || openbsd
 // +build aix darwin dragonfly freebsd openbsd
 
 package socket
diff --git a/internal/socket/sys_const_unix.go b/internal/socket/sys_const_unix.go
index 43797d6..f077b2f 100644
--- a/internal/socket/sys_const_unix.go
+++ b/internal/socket/sys_const_unix.go
@@ -2,6 +2,7 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
+//go:build aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris
 // +build aix darwin dragonfly freebsd linux netbsd openbsd solaris
 
 package socket
diff --git a/internal/socket/sys_const_zos.go b/internal/socket/sys_const_zos.go
index 01b6372..3048629 100644
--- a/internal/socket/sys_const_zos.go
+++ b/internal/socket/sys_const_zos.go
@@ -2,6 +2,7 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
+//go:build zos
 // +build zos
 
 package socket
diff --git a/internal/socket/sys_linkname.go b/internal/socket/sys_linkname.go
index 61c3f38..21734af 100644
--- a/internal/socket/sys_linkname.go
+++ b/internal/socket/sys_linkname.go
@@ -2,6 +2,7 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
+//go:build aix || (go1.12 && darwin)
 // +build aix go1.12,darwin
 
 package socket
diff --git a/internal/socket/sys_linux.go b/internal/socket/sys_linux.go
index 8b03cd6..76f5b8a 100644
--- a/internal/socket/sys_linux.go
+++ b/internal/socket/sys_linux.go
@@ -2,6 +2,7 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
+//go:build linux && !s390x && !386
 // +build linux,!s390x,!386
 
 package socket
diff --git a/internal/socket/sys_linux_riscv64.go b/internal/socket/sys_linux_riscv64.go
index 64f69f1..5b128fb 100644
--- a/internal/socket/sys_linux_riscv64.go
+++ b/internal/socket/sys_linux_riscv64.go
@@ -2,6 +2,7 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
+//go:build riscv64
 // +build riscv64
 
 package socket
diff --git a/internal/socket/sys_posix.go b/internal/socket/sys_posix.go
index 05ded23..25ded21 100644
--- a/internal/socket/sys_posix.go
+++ b/internal/socket/sys_posix.go
@@ -2,6 +2,7 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
+//go:build aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris || windows || zos
 // +build aix darwin dragonfly freebsd linux netbsd openbsd solaris windows zos
 
 package socket
diff --git a/internal/socket/sys_stub.go b/internal/socket/sys_stub.go
index 3c97008..dc7bb38 100644
--- a/internal/socket/sys_stub.go
+++ b/internal/socket/sys_stub.go
@@ -2,6 +2,7 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
+//go:build !aix && !darwin && !dragonfly && !freebsd && !linux && !netbsd && !openbsd && !solaris && !windows && !zos
 // +build !aix,!darwin,!dragonfly,!freebsd,!linux,!netbsd,!openbsd,!solaris,!windows,!zos
 
 package socket
diff --git a/internal/socket/sys_unix.go b/internal/socket/sys_unix.go
index 0eb7128..c98ebae 100644
--- a/internal/socket/sys_unix.go
+++ b/internal/socket/sys_unix.go
@@ -2,6 +2,7 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
+//go:build dragonfly || freebsd || (linux && !s390x && !386) || netbsd || openbsd
 // +build dragonfly freebsd linux,!s390x,!386 netbsd openbsd
 
 package socket
diff --git a/internal/socket/zsys_aix_ppc64.go b/internal/socket/zsys_aix_ppc64.go
index 93d923a..79f3bdd 100644
--- a/internal/socket/zsys_aix_ppc64.go
+++ b/internal/socket/zsys_aix_ppc64.go
@@ -2,6 +2,7 @@
 // cgo -godefs defs_aix.go
 
 // Added for go1.11 compatibility
+//go:build aix
 // +build aix
 
 package socket
diff --git a/internal/socket/zsys_linux_riscv64.go b/internal/socket/zsys_linux_riscv64.go
index 8640c03..12ec2e4 100644
--- a/internal/socket/zsys_linux_riscv64.go
+++ b/internal/socket/zsys_linux_riscv64.go
@@ -1,6 +1,7 @@
 // Code generated by cmd/cgo -godefs; DO NOT EDIT.
 // cgo -godefs defs_linux.go
 
+//go:build riscv64
 // +build riscv64
 
 package socket