syscall: port fix for netbsd unix sockets from upstream

NetBSD does not include the null terminator when in its reported socket
length. Port the upstream bugfix for the issue (#6627).

This was likely missed during the usual upstream merge because the gc
and gccgo socket implementations have diverged quite a bit.

Change-Id: Id808bae481b5de494cfc641ca9d7f56fef6acd41
Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/261741
Trust: Than McIntosh <thanm@google.com>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
1 file changed