libgo: export NetBSD-specific types in

The syscall package depends on many NetBSD-specific types on NetBSD.
Teach to export these types.

This alone is not sufficient to get the syscall package to compile on
NetBSD, but it's a start.

Note that the IfMsgHdr type is recapitalized to IfMsghdr, which requires
changes in the AIX port. The new capitalization is what's used by
upstream in existing NetBSD-specific code and is more consistent with
the capitalization of other C structs with the "hdr" suffix.

Updates golang/go#38538.

Change-Id: I56d8d8d887b293d5a9195114cc7f7b44a5b738cb
Reviewed-by: Benny Siegert <>
Trust: Benny Siegert <>
Trust: Than McIntosh <>
6 files changed