mirror of
https://github.com/rwinkhart/sys.git
synced 2026-08-28 04:46:44 -04:00
unix: implement AF_SYSTEM/AF_SYS_CONTROL sockets on darwin
See https://developer.apple.com/documentation/kernel/sockaddr_ctl for details. AF_SYSTEM is darwin-specific, so the BSD-specific anyToSockaddr func needs to call GOOS-specific funcs which return nil, EAFNOSUPPORT on all BSD platforms but darwin. For golang/go#41868 Change-Id: Id7794aba5988dd9511053b76be5efeb66c104a26 Reviewed-on: https://go-review.googlesource.com/c/sys/+/264638 Trust: Tobias Klauser <tobias.klauser@gmail.com> Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com> TryBot-Result: Go Bot <gobot@golang.org> Reviewed-by: Matt Layher <mdlayher@gmail.com>
This commit is contained in:
committed by
Tobias Klauser
parent
119d4633e4
commit
e1471140ff
+1
-1
@@ -277,7 +277,7 @@ func anyToSockaddr(fd int, rsa *RawSockaddrAny) (Sockaddr, error) {
|
||||
}
|
||||
return sa, nil
|
||||
}
|
||||
return nil, EAFNOSUPPORT
|
||||
return anyToSockaddrGOOS(fd, rsa)
|
||||
}
|
||||
|
||||
func Accept(fd int) (nfd int, sa Sockaddr, err error) {
|
||||
|
||||
Reference in New Issue
Block a user