X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=lib%2Fsetsockopt.c;h=24a8d6e5bf136c03073a616e6f0ed25e7e5bf8c2;hb=b2e2010c7c902235b5efb5bd3c6529f61b093aa4;hp=96a00cc2e7492e19265eae172e6175fc0befb53a;hpb=6aebe8304ac5fcc50de5042107fada53612d552e;p=pspp diff --git a/lib/setsockopt.c b/lib/setsockopt.c index 96a00cc2e7..24a8d6e5bf 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-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 @@ -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 {