Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
opendht
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Model registry
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
savoirfairelinux
opendht
Commits
5fde50be
Commit
5fde50be
authored
7 years ago
by
Adrien Béraud
Browse files
Options
Downloads
Patches
Plain Diff
dhtrunner: use const char* for setopt value
fix build on Win32
parent
1c16e6f3
Branches
Branches containing commit
Tags
1.5.0
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/dhtrunner.cpp
+2
-2
2 additions, 2 deletions
src/dhtrunner.cpp
with
2 additions
and
2 deletions
src/dhtrunner.cpp
+
2
−
2
View file @
5fde50be
...
...
@@ -382,10 +382,10 @@ int bindSocket(const SockAddr& addr, SockAddr& bound)
throw
DhtException
(
std
::
string
(
"Can't open socket: "
)
+
strerror
(
sock
));
int
set
=
1
;
#ifdef SO_NOSIGPIPE
setsockopt
(
sock
,
SOL_SOCKET
,
SO_NOSIGPIPE
,
(
void
*
)
&
set
,
sizeof
(
set
));
setsockopt
(
sock
,
SOL_SOCKET
,
SO_NOSIGPIPE
,
(
const
char
*
)
&
set
,
sizeof
(
set
));
#endif
if
(
is_ipv6
)
setsockopt
(
sock
,
IPPROTO_IPV6
,
IPV6_V6ONLY
,
(
void
*
)
&
set
,
sizeof
(
set
));
setsockopt
(
sock
,
IPPROTO_IPV6
,
IPV6_V6ONLY
,
(
const
char
*
)
&
set
,
sizeof
(
set
));
int
rc
=
bind
(
sock
,
addr
.
get
(),
addr
.
getLength
());
if
(
rc
<
0
)
throw
DhtException
(
"Can't bind socket on "
+
addr
.
toString
()
+
" "
+
strerror
(
rc
));
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment