X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;f=lib%2Fsetsockopt.c;h=a31a10ee92aea53449f3b602eecaa68b39b40f61;hb=135351c549050196b5c1322b3ab1e956565ab3d8;hp=96a00cc2e7492e19265eae172e6175fc0befb53a;hpb=6aebe8304ac5fcc50de5042107fada53612d552e;p=gnulib.git diff --git a/lib/setsockopt.c b/lib/setsockopt.c index 96a00cc2e..a31a10ee9 100644 --- a/lib/setsockopt.c +++ b/lib/setsockopt.c @@ -1,6 +1,6 @@ /* setsockopt.c --- wrappers for Windows setsockopt function - Copyright (C) 2008-2009 Free Software Foundation, Inc. + Copyright (C) 2008-2011 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 @@ -41,7 +41,8 @@ rpl_setsockopt (int fd, int level, int optname, const void *optval, socklen_t op { 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 {