summaryrefslogtreecommitdiff
path: root/libgo/go/net/unixsock_posix.go
diff options
context:
space:
mode:
Diffstat (limited to 'libgo/go/net/unixsock_posix.go')
-rw-r--r--libgo/go/net/unixsock_posix.go6
1 files changed, 5 insertions, 1 deletions
diff --git a/libgo/go/net/unixsock_posix.go b/libgo/go/net/unixsock_posix.go
index b82f3cee0b5..54d9d16c99e 100644
--- a/libgo/go/net/unixsock_posix.go
+++ b/libgo/go/net/unixsock_posix.go
@@ -280,7 +280,11 @@ func (l *UnixListener) AcceptUnix() (*UnixConn, error) {
if l == nil || l.fd == nil {
return nil, syscall.EINVAL
}
- fd, err := l.fd.accept(sockaddrToUnix)
+ toAddr := sockaddrToUnix
+ if l.fd.sotype == syscall.SOCK_SEQPACKET {
+ toAddr = sockaddrToUnixpacket
+ }
+ fd, err := l.fd.accept(toAddr)
if err != nil {
return nil, err
}