summaryrefslogtreecommitdiffstats
path: root/Source/CTest/Curl/if2ip.c
diff options
context:
space:
mode:
Diffstat (limited to 'Source/CTest/Curl/if2ip.c')
-rw-r--r--Source/CTest/Curl/if2ip.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/Source/CTest/Curl/if2ip.c b/Source/CTest/Curl/if2ip.c
index 5f958d3..00fb9fb 100644
--- a/Source/CTest/Curl/if2ip.c
+++ b/Source/CTest/Curl/if2ip.c
@@ -106,7 +106,9 @@ char *Curl_if2ip(char *interface, char *buf, int buf_size)
else {
struct in_addr in;
- struct sockaddr_in *s = (struct sockaddr_in *)&req.ifr_dstaddr;
+ struct sockaddr_in *s;
+ struct sockaddr *sadd = &req.ifr_dstaddr;
+ memcpy(&s, &sadd, sizeof(struct sockaddr_in*));
memcpy(&in, &(s->sin_addr.s_addr), sizeof(in));
#if defined(HAVE_INET_NTOA_R)
ip = inet_ntoa_r(in,buf,buf_size);