- 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.
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 @@
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 @@
continue;
}
#endif
- sai.sin_addr = lsa->sin.sin_addr;
+ sai.sin_addr = lsa->u.sin.sin_addr;
if (ENABLE_FEATURE_CLEAN_UP)
free(lsa);
}