http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56171
Bug #: 56171 Summary: syscall FAILs on Solaris Classification: Unclassified Product: gcc Version: 4.8.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: go AssignedTo: i...@airs.com ReportedBy: r...@gcc.gnu.org Host: *-*-solaris2.* Target: *-*-solaris2.* Build: *-*-solaris2.* The libgo syscall tests currently FAILs on Solaris: creds_test.go:22:41: error: reference to undefined identifier 'syscall.AF_LOCAL' fds, err := syscall.Socketpair(syscall.AF_LOCAL, syscall.SOCK_STREAM, 0) ^ creds_test.go:29:66: error: reference to undefined identifier 'syscall.SO_PASSCR ED' err = syscall.SetsockoptInt(fds[0], syscall.SOL_SOCKET, syscall.SO_PASSCRED, 1 ) ^ creds_test.go:52:12: error: reference to undefined identifier 'syscall.Ucred' var ucred syscall.Ucred ^ creds_test.go:57:18: error: reference to undefined identifier 'syscall.UnixCrede ntials' oob := syscall.UnixCredentials(&ucred) ^ creds_test.go:67:17: error: reference to undefined identifier 'syscall.UnixCrede ntials' oob := syscall.UnixCredentials(&ucred) ^ creds_test.go:106:27: error: reference to undefined identifier 'syscall.ParseUnixCredentials' newUcred, err := syscall.ParseUnixCredentials(&scm[0]) ^ passfd_test.go:40:41: error: reference to undefined identifier 'syscall.AF_LOCAL ' fds, err := syscall.Socketpair(syscall.AF_LOCAL, syscall.SOCK_STREAM, 0) ^ FAIL: syscall There are two issues here: * passfd_test.go uses AF_LOCAL, which only exists from Solaris 11 onwards and is an alternative name for the more common AF_UNIX. One could either provide AF_LOCAL in mksysinfo.sh if missing or directly use AF_UNIX, as is already done in go/net/file_unix.go, go/net/unixsock_posix.go, go/syscall/socket.go. * creds_test.go uses Ucred, UnixCredentials, and SO_PASSCRED, which in their current form are a Linuxism. Solaris has SO_RECVUCRED, an opaque ucred_t with opaque accessor functions (cf. ucred_get(3C) and getpeerucred(3C)). Rainer