diff options
author | Andy Cedilnik <andy.cedilnik@kitware.com> | 2004-10-11 15:47:14 (GMT) |
---|---|---|
committer | Andy Cedilnik <andy.cedilnik@kitware.com> | 2004-10-11 15:47:14 (GMT) |
commit | 45c1dce09fc3e02ddff4a5ad4d37ed28fc0083b3 (patch) | |
tree | 08957192ab4b481bcc5aa80681b3f42cf6562fad /Source | |
parent | e0778d48bd98969f6610333e6ceac21c9a48791d (diff) | |
download | CMake-45c1dce09fc3e02ddff4a5ad4d37ed28fc0083b3.zip CMake-45c1dce09fc3e02ddff4a5ad4d37ed28fc0083b3.tar.gz CMake-45c1dce09fc3e02ddff4a5ad4d37ed28fc0083b3.tar.bz2 |
COMP: Remove alignment warning
Diffstat (limited to 'Source')
-rw-r--r-- | Source/CTest/Curl/if2ip.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/Source/CTest/Curl/if2ip.c b/Source/CTest/Curl/if2ip.c index 594e74c..8bccc94 100644 --- a/Source/CTest/Curl/if2ip.c +++ b/Source/CTest/Curl/if2ip.c @@ -111,8 +111,13 @@ char *Curl_if2ip(const char *interface, char *buf, int buf_size) else { struct in_addr in; - struct sockaddr_in *s = (struct sockaddr_in *)&req.ifr_dstaddr; - memcpy(&in, &(s->sin_addr.s_addr), sizeof(in)); + union { + struct sockaddr_in *sin; + struct sockaddr *s; + } soadd; + + soadd.s = &req.ifr_dstaddr; + memcpy(&in, &(soadd.sin->sin_addr.s_addr), sizeof(in)); #if defined(HAVE_INET_NTOA_R) ip = inet_ntoa_r(in,buf,buf_size); #else |