From 8c69afd992d7cc6c2fc7dea59c3c2bd3f3c21f15 Mon Sep 17 00:00:00 2001 From: Bernhard Reutner-Fischer Date: Tue, 29 Jan 2008 10:33:34 +0000 Subject: - be C99 friendly. Anonymous unions are a GNU extension. This change is size-neutral WRT -std=gnu99 and fixes several compilation errors for strict C99 mode. --- networking/ifconfig.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'networking/ifconfig.c') diff --git a/networking/ifconfig.c b/networking/ifconfig.c index fff5f5d2e..fcbeb2420 100644 --- a/networking/ifconfig.c +++ b/networking/ifconfig.c @@ -392,12 +392,12 @@ int ifconfig_main(int argc, char **argv) continue; /* compat stuff */ lsa = xhost2sockaddr(host, 0); #if ENABLE_FEATURE_IPV6 - if (lsa->sa.sa_family == AF_INET6) { + if (lsa->u.sa.sa_family == AF_INET6) { int sockfd6; struct in6_ifreq ifr6; memcpy((char *) &ifr6.ifr6_addr, - (char *) &(lsa->sin6.sin6_addr), + (char *) &(lsa->u.sin6.sin6_addr), sizeof(struct in6_addr)); /* Create a channel to the NET kernel. */ @@ -411,7 +411,7 @@ int ifconfig_main(int argc, char **argv) continue; } #endif - sai.sin_addr = lsa->sin.sin_addr; + sai.sin_addr = lsa->u.sin.sin_addr; if (ENABLE_FEATURE_CLEAN_UP) free(lsa); } -- cgit v1.2.3