From: Roy Marples Date: Sun, 19 Oct 2008 05:39:28 +0000 (+0000) Subject: Cast to void * to remove compiler warnings on Sparc64. This should still be aligned... X-Git-Tag: v5.0.0~209 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=791c6214a99cd42902ac160569e2c3dce32aa181;p=thirdparty%2Fdhcpcd.git Cast to void * to remove compiler warnings on Sparc64. This should still be aligned correctly as this is how the kernel makes it. --- 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. */