mirror of
https://github.com/rwinkhart/sys.git
synced 2026-08-28 04:46:44 -04:00
unix: add Xucred, GetsockoptXucred on freebsd
Follow CL 292330 which added these on darwin. Generated on FreeBSD 13.0BETA3 For golang/go#41659 Change-Id: I30eeef43c4f61a9449f3fe8b5cc0033f46dfe822 Reviewed-on: https://go-review.googlesource.com/c/sys/+/294989 Trust: Tobias Klauser <tobias.klauser@gmail.com> Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com> TryBot-Result: Go Bot <gobot@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
This commit is contained in:
committed by
Tobias Klauser
parent
b80eb88b80
commit
7937bea010
@@ -382,7 +382,7 @@ func Sendfile(outfd int, infd int, offset *int64, count int) (written int, err e
|
||||
// The usual level and opt are SOL_LOCAL and LOCAL_PEERCRED, respectively.
|
||||
func GetsockoptXucred(fd, level, opt int) (*Xucred, error) {
|
||||
x := new(Xucred)
|
||||
vallen := _Socklen(unsafe.Sizeof(Xucred{}))
|
||||
vallen := _Socklen(SizeofXucred)
|
||||
err := getsockopt(fd, level, opt, unsafe.Pointer(x), &vallen)
|
||||
return x, err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user