summaryrefslogtreecommitdiff
path: root/lib/socks.c
diff options
context:
space:
mode:
authorTatsuhiro Tsujikawa <tatsuhiro.t@gmail.com>2015-09-26 17:24:34 +0900
committerDaniel Stenberg <daniel@haxx.se>2015-09-26 23:10:20 +0200
commit119037325de02579f5c58256ca2ed2a0aa592c86 (patch)
tree5cab499d5739de106ecb301aebb23dcbb2c65a6a /lib/socks.c
parent710bb89cf3f952e731b7bd0b7d301f8b1cd0015c (diff)
downloadcurl-119037325de02579f5c58256ca2ed2a0aa592c86.tar.gz
build: fix failures with -Wcast-align and -Werror
Closes #457
Diffstat (limited to 'lib/socks.c')
-rw-r--r--lib/socks.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/socks.c b/lib/socks.c
index 7d3f782b4..78c4d23a5 100644
--- a/lib/socks.c
+++ b/lib/socks.c
@@ -603,7 +603,7 @@ CURLcode Curl_SOCKS5(const char *proxy_name,
if(hp->ai_family == AF_INET) {
socksreq[len++] = 1; /* ATYP: IPv4 = 1 */
- saddr_in = (struct sockaddr_in*)hp->ai_addr;
+ saddr_in = (struct sockaddr_in*)(void*)hp->ai_addr;
for(i = 0; i < 4; i++) {
socksreq[len++] = ((unsigned char*)&saddr_in->sin_addr.s_addr)[i];
infof(data, "%d\n", socksreq[len-1]);
@@ -613,7 +613,7 @@ CURLcode Curl_SOCKS5(const char *proxy_name,
else if(hp->ai_family == AF_INET6) {
socksreq[len++] = 4; /* ATYP: IPv6 = 4 */
- saddr_in6 = (struct sockaddr_in6*)hp->ai_addr;
+ saddr_in6 = (struct sockaddr_in6*)(void*)hp->ai_addr;
for(i = 0; i < 16; i++) {
socksreq[len++] = ((unsigned char*)&saddr_in6->sin6_addr.s6_addr)[i];
}