aboutsummaryrefslogtreecommitdiff
path: root/vendor/golang.org/x/sys/unix/sockcmsg_dragonfly.go
diff options
context:
space:
mode:
authorSandro Jäckel <sandro.jaeckel@sap.com>2022-04-01 14:08:42 +0200
committerSandro Jäckel <sandro.jaeckel@sap.com>2022-04-01 14:09:09 +0200
commitd35e5fb09bfac1fa381e4ed004ea24a6025e36f4 (patch)
treee47874ed2c6830abf4c84e9068bc187fb041b6b4 /vendor/golang.org/x/sys/unix/sockcmsg_dragonfly.go
parentcb398f58a5cb4f3e858fe60e84debde6ab58f7c8 (diff)
downloadgofu-d35e5fb09bfac1fa381e4ed004ea24a6025e36f4.tar.gz
Bump to go 1.17 and update all dependencies
Diffstat (limited to 'vendor/golang.org/x/sys/unix/sockcmsg_dragonfly.go')
-rw-r--r--vendor/golang.org/x/sys/unix/sockcmsg_dragonfly.go16
1 files changed, 16 insertions, 0 deletions
diff --git a/vendor/golang.org/x/sys/unix/sockcmsg_dragonfly.go b/vendor/golang.org/x/sys/unix/sockcmsg_dragonfly.go
new file mode 100644
index 0000000..5144dee
--- /dev/null
+++ b/vendor/golang.org/x/sys/unix/sockcmsg_dragonfly.go
@@ -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.
+
+package unix
+
+// Round the length of a raw sockaddr up to align it properly.
+func cmsgAlignOf(salen int) int {
+ salign := SizeofPtr
+ if SizeofPtr == 8 && !supportsABI(_dragonflyABIChangeVersion) {
+ // 64-bit Dragonfly before the September 2019 ABI changes still requires
+ // 32-bit aligned access to network subsystem.
+ salign = 4
+ }
+ return (salen + salign - 1) & ^(salign - 1)
+}