aboutsummaryrefslogtreecommitdiff
path: root/libgo/go/syscall/socket_bsd.go
diff options
context:
space:
mode:
authorIan Lance Taylor <ian@gcc.gnu.org>2013-07-24 16:53:17 +0000
committerIan Lance Taylor <ian@gcc.gnu.org>2013-07-24 16:53:17 +0000
commitf735ce315f6d9ee0c67c319d4ad58b65ed4ab28b (patch)
treeed13d57ba29d665908e53c726aa0dfdabc4d40d7 /libgo/go/syscall/socket_bsd.go
parent821f6f1b318ce6b5e5aad7941593324b20217c32 (diff)
downloadgcc-f735ce315f6d9ee0c67c319d4ad58b65ed4ab28b.zip
gcc-f735ce315f6d9ee0c67c319d4ad58b65ed4ab28b.tar.gz
gcc-f735ce315f6d9ee0c67c319d4ad58b65ed4ab28b.tar.bz2
net: Only use GNU/Linux unix socket abstract paths on GNU/Linux.
From-SVN: r201217
Diffstat (limited to 'libgo/go/syscall/socket_bsd.go')
-rw-r--r--libgo/go/syscall/socket_bsd.go38
1 files changed, 21 insertions, 17 deletions
diff --git a/libgo/go/syscall/socket_bsd.go b/libgo/go/syscall/socket_bsd.go
index be55991..72d7180 100644
--- a/libgo/go/syscall/socket_bsd.go
+++ b/libgo/go/syscall/socket_bsd.go
@@ -11,11 +11,11 @@ const SizeofSockaddrInet6 = 28
const SizeofSockaddrUnix = 110
type RawSockaddrInet4 struct {
- Len uint8;
- Family uint8;
- Port uint16;
- Addr [4]byte /* in_addr */;
- Zero [8]uint8;
+ Len uint8
+ Family uint8
+ Port uint16
+ Addr [4]byte /* in_addr */
+ Zero [8]uint8
}
func (sa *RawSockaddrInet4) setLen() Socklen_t {
@@ -24,12 +24,12 @@ func (sa *RawSockaddrInet4) setLen() Socklen_t {
}
type RawSockaddrInet6 struct {
- Len uint8;
- Family uint8;
- Port uint16;
- Flowinfo uint32;
- Addr [16]byte /* in6_addr */;
- Scope_id uint32;
+ Len uint8
+ Family uint8
+ Port uint16
+ Flowinfo uint32
+ Addr [16]byte /* in6_addr */
+ Scope_id uint32
}
func (sa *RawSockaddrInet6) setLen() Socklen_t {
@@ -38,9 +38,9 @@ func (sa *RawSockaddrInet6) setLen() Socklen_t {
}
type RawSockaddrUnix struct {
- Len uint8;
- Family uint8;
- Path [108]int8;
+ Len uint8
+ Family uint8
+ Path [108]int8
}
func (sa *RawSockaddrUnix) setLen(n int) {
@@ -62,10 +62,14 @@ func (sa *RawSockaddrUnix) getLen() (int, error) {
return n, nil
}
+func (sa *RawSockaddrUnix) adjustAbstract(sl Socklen_t) Socklen_t {
+ return sl
+}
+
type RawSockaddr struct {
- Len uint8;
- Family uint8;
- Data [14]int8;
+ Len uint8
+ Family uint8
+ Data [14]int8
}
// BindToDevice binds the socket associated with fd to device.