summaryrefslogtreecommitdiffstats
path: root/src/openvpn/socket.h
diff options
context:
space:
mode:
authorJames Yonan <james@openvpn.net>2013-07-28 16:05:35 -0600
committerGert Doering <gert@greenie.muc.de>2013-08-16 17:20:44 +0200
commit46e02127a44270c7199f458f43807bff2ddb11f3 (patch)
treee00f4b31331d5455f62f60e5f695d9d9cba9bc74 /src/openvpn/socket.h
parent2a92fba756d4c1e73300a12ff9e80028a6ab7c09 (diff)
downloadopenvpn-46e02127a44270c7199f458f43807bff2ddb11f3.tar.gz
openvpn-46e02127a44270c7199f458f43807bff2ddb11f3.tar.xz
openvpn-46e02127a44270c7199f458f43807bff2ddb11f3.zip
MSVC fixes
Fixes to allow compilation with Microsoft Visual Studio 2008 * Fixed several instances of declarations after statements. * In socket.c, fixed issue where uninitialized value (err) is being passed to to gai_strerror. * ssl.c is trying to access multi_output_peer_info_env function in multi.c, causing an undefined symbol warning at compile time. ssl.c is strictly a client of multi.c (but not the other way around), therefore ssl.c does not include multi.h and should not depend on multi.h API. To fix, moved validate_peer_info_line and multi_output_peer_info_env from multi.c to misc.c. * MSVC doesn't support %z as a printf format specifier for size_t * MSVC doesn't support a const variable being used to dimension an array. * Explicitly cast the third parameter to setsockopt to const void * Acked-by: Gert Doering <gert@greenie.muc.de> Message-Id: <1375049135-21444-1-git-send-email-james@openvpn.net> URL: http://article.gmane.org/gmane.network.openvpn.devel/7777 Signed-off-by: Gert Doering <gert@greenie.muc.de>
Diffstat (limited to 'src/openvpn/socket.h')
-rw-r--r--src/openvpn/socket.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/openvpn/socket.h b/src/openvpn/socket.h
index 4e7e7f8..793cd9f 100644
--- a/src/openvpn/socket.h
+++ b/src/openvpn/socket.h
@@ -1023,7 +1023,7 @@ static inline void
link_socket_set_tos (struct link_socket *ls)
{
if (ls && ls->ptos_defined)
- setsockopt (ls->sd, IPPROTO_IP, IP_TOS, &ls->ptos, sizeof (ls->ptos));
+ setsockopt (ls->sd, IPPROTO_IP, IP_TOS, (const void *)&ls->ptos, sizeof (ls->ptos));
}
#endif