projects
/
gnulib.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
autoupdates
[gnulib.git]
/
lib
/
setsockopt.c
diff --git
a/lib/setsockopt.c
b/lib/setsockopt.c
index
64f4a81
..
24a8d6e
100644
(file)
--- a/
lib/setsockopt.c
+++ b/
lib/setsockopt.c
@@
-1,6
+1,6
@@
/* setsockopt.c --- wrappers for Windows setsockopt function
/* setsockopt.c --- wrappers for Windows setsockopt function
- Copyright (C) 2008 Free Software Foundation, Inc.
+ Copyright (C) 2008
-2010
Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@
-32,7
+32,7
@@
#undef setsockopt
int
#undef setsockopt
int
-rpl_setsockopt (int fd, int level, int optname, const void *optval,
in
t optlen)
+rpl_setsockopt (int fd, int level, int optname, const void *optval,
socklen_
t optlen)
{
int r;
SOCKET sock = FD_TO_SOCKET (fd);
{
int r;
SOCKET sock = FD_TO_SOCKET (fd);
@@
-41,7
+41,8
@@
rpl_setsockopt (int fd, int level, int optname, const void *optval, int optlen)
{
const struct timeval *tv = optval;
int milliseconds = tv->tv_sec * 1000 + tv->tv_usec / 1000;
{
const struct timeval *tv = optval;
int milliseconds = tv->tv_sec * 1000 + tv->tv_usec / 1000;
- r = setsockopt (sock, level, optname, &milliseconds, sizeof (int));
+ optval = &milliseconds;
+ r = setsockopt (sock, level, optname, optval, sizeof (int));
}
else
{
}
else
{