summaryrefslogtreecommitdiffstats
path: root/net.c
diff options
context:
space:
mode:
authorRoy Marples <roy@marples.name>2008-10-19 05:39:28 +0000
committerRoy Marples <roy@marples.name>2008-10-19 05:39:28 +0000
commit791c6214a99cd42902ac160569e2c3dce32aa181 (patch)
tree6dc2f199f00962e9dd590ca6287a64453f6e4cae /net.c
parent34bf905984347f0f73a3d237408a943ce50086b1 (diff)
downloaddhcpcd-791c6214a99cd42902ac160569e2c3dce32aa181.tar.xz
Cast to void * to remove compiler warnings on Sparc64. This should still be aligned correctly as this is how the kernel makes it.
Diffstat (limited to 'net.c')
-rw-r--r--net.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/net.c b/net.c
index 1d8e1055..bf82588e 100644
--- a/net.c
+++ b/net.c
@@ -315,7 +315,7 @@ do_interface(const char *ifname,
e = (char *)ifc.ifc_buf + ifc.ifc_len;
for (p = ifc.ifc_buf; p < e;) {
- ifr = (struct ifreq *)p;
+ ifr = (struct ifreq *)(void *)p;
#ifndef __linux__
if (ifr->ifr_addr.sa_len > sizeof(ifr->ifr_ifru))
@@ -337,7 +337,7 @@ do_interface(const char *ifname,
}
if (ifr->ifr_addr.sa_family == AF_INET && addr) {
- sin = (struct sockaddr_in *)&ifr->ifr_addr;
+ sin = (struct sockaddr_in *)(void *)&ifr->ifr_addr;
address = sin->sin_addr.s_addr;
/* Some platforms only partially fill the bits
* set by the netmask, so we need to zero it now. */