]> git.ipfire.org Git - thirdparty/dhcpcd.git/commitdiff
Cast to void * to remove compiler warnings on Sparc64. This should still be aligned...
authorRoy Marples <roy@marples.name>
Sun, 19 Oct 2008 05:39:28 +0000 (05:39 +0000)
committerRoy Marples <roy@marples.name>
Sun, 19 Oct 2008 05:39:28 +0000 (05:39 +0000)
net.c

diff --git a/net.c b/net.c
index 1d8e1055fe500b461a372b505df85bb815e8cbd3..bf82588eb31239d16c40c19ecc3236b81c863671 100644 (file)
--- 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. */