Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
p2p
go-sockaddr
Commits
7121ca14
Commit
7121ca14
authored
Nov 09, 2014
by
Juan Batiz-Benet
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed linux compile err
parent
692297a8
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
sockaddr_linux.go
sockaddr_linux.go
+2
-2
No files found.
sockaddr_linux.go
View file @
7121ca14
...
...
@@ -63,11 +63,11 @@ func sockaddrToAny(sa syscall.Sockaddr) (*syscall.RawSockaddrAny, Socklen, error
}
return
(
*
syscall
.
RawSockaddrAny
)(
unsafe
.
Pointer
(
&
raw
)),
sl
,
nil
case
*
syscall
.
Sockaddr
Datalink
:
case
*
syscall
.
Sockaddr
Linklayer
:
if
sa
.
Ifindex
<
0
||
sa
.
Ifindex
>
0x7fffffff
{
return
nil
,
0
,
syscall
.
EINVAL
}
var
raw
syscall
.
RawSockaddr
Datalink
var
raw
syscall
.
RawSockaddr
Linklayer
raw
.
Family
=
syscall
.
AF_PACKET
raw
.
Protocol
=
sa
.
Protocol
raw
.
Ifindex
=
int32
(
sa
.
Ifindex
)
...
...
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