diff options
author | Bernhard Reutner-Fischer | 2008-01-29 10:33:34 +0000 |
---|---|---|
committer | Bernhard Reutner-Fischer | 2008-01-29 10:33:34 +0000 |
commit | 8c69afd992d7cc6c2fc7dea59c3c2bd3f3c21f15 (patch) | |
tree | 998a337ecd57b737423a3793365519213f97da72 /networking/ifconfig.c | |
parent | c882f341cec8451ee87af6746abb7208272d5b1a (diff) | |
download | busybox-8c69afd992d7cc6c2fc7dea59c3c2bd3f3c21f15.zip busybox-8c69afd992d7cc6c2fc7dea59c3c2bd3f3c21f15.tar.gz |
- 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.
Diffstat (limited to 'networking/ifconfig.c')
-rw-r--r-- | networking/ifconfig.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/networking/ifconfig.c b/networking/ifconfig.c index fff5f5d..fcbeb24 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); } |