Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
G
golang
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
go
golang
Commits
80b5482a
Commit
80b5482a
authored
May 14, 2009
by
Rob Pike
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix abstract unix domain sockets
R=rsc DELTA=5 (3 added, 0 deleted, 2 changed) OCL=28845 CL=28849
parent
05851636
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
5 additions
and
2 deletions
+5
-2
net_linux.go
src/lib/net/net_linux.go
+1
-0
socket_linux.go
src/lib/syscall/socket_linux.go
+2
-1
types_amd64_linux.go
src/lib/syscall/types_amd64_linux.go
+2
-1
No files found.
src/lib/net/net_linux.go
View file @
80b5482a
...
...
@@ -95,6 +95,7 @@ func unixToSockaddr(name string) (sa1 *syscall.Sockaddr, err os.Error) {
if
sa
.
Path
[
0
]
==
'@'
{
sa
.
Path
[
0
]
=
0
;
}
sa
.
Length
=
1
+
int64
(
n
)
+
1
;
// family, name, \0
return
(
*
syscall
.
Sockaddr
)(
unsafe
.
Pointer
(
sa
)),
nil
;
}
...
...
src/lib/syscall/socket_linux.go
View file @
80b5482a
...
...
@@ -19,7 +19,8 @@ var SocketDisableIPv6 bool
func
saLen
(
s
*
Sockaddr
)
int64
{
switch
s
.
Family
{
case
AF_UNIX
:
return
SizeofSockaddrUnix
;
sa
:=
(
*
SockaddrUnix
)(
unsafe
.
Pointer
(
s
));
return
sa
.
Length
;
case
AF_INET
:
return
SizeofSockaddrInet4
;
case
AF_INET6
:
...
...
src/lib/syscall/types_amd64_linux.go
View file @
80b5482a
...
...
@@ -166,7 +166,8 @@ const (
type
SockaddrUnix
struct
{
Family
uint16
;
Path
[
108
]
byte
Path
[
108
]
byte
;
Length
int64
;
// Not part of the kernel structure; used internally
}
const
SizeofSockaddrUnix
=
110
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment