summaryrefslogtreecommitdiff
path: root/networking/dnsd.c
diff options
context:
space:
mode:
authorBernhard Reutner-Fischer2008-01-29 10:33:34 +0000
committerBernhard Reutner-Fischer2008-01-29 10:33:34 +0000
commit8c69afd992d7cc6c2fc7dea59c3c2bd3f3c21f15 (patch)
tree998a337ecd57b737423a3793365519213f97da72 /networking/dnsd.c
parentc882f341cec8451ee87af6746abb7208272d5b1a (diff)
downloadbusybox-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/dnsd.c')
-rw-r--r--networking/dnsd.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/networking/dnsd.c b/networking/dnsd.c
index 19720d6..5e78861 100644
--- a/networking/dnsd.c
+++ b/networking/dnsd.c
@@ -371,11 +371,11 @@ int dnsd_main(int argc, char **argv)
#endif
lsa = xdotted2sockaddr(listen_interface, port);
- udps = xsocket(lsa->sa.sa_family, SOCK_DGRAM, 0);
- xbind(udps, &lsa->sa, lsa->len);
+ udps = xsocket(lsa->u.sa.sa_family, SOCK_DGRAM, 0);
+ xbind(udps, &lsa->u.sa, lsa->len);
/* xlisten(udps, 50); - ?!! DGRAM sockets are never listened on I think? */
bb_info_msg("Accepting UDP packets on %s",
- xmalloc_sockaddr2dotted(&lsa->sa));
+ xmalloc_sockaddr2dotted(&lsa->u.sa));
while (1) {
int r;
@@ -385,7 +385,7 @@ int dnsd_main(int argc, char **argv)
// Or else we can exhibit usual UDP ugliness:
// [ip1.multihomed.ip2] <= query to ip1 <= peer
// [ip1.multihomed.ip2] => reply from ip2 => peer (confused)
- r = recvfrom(udps, buf, sizeof(buf), 0, &lsa->sa, &fromlen);
+ r = recvfrom(udps, buf, sizeof(buf), 0, &lsa->u.sa, &fromlen);
if (OPT_verbose)
bb_info_msg("Got UDP packet");
if (r < 12 || r > 512) {
@@ -395,7 +395,7 @@ int dnsd_main(int argc, char **argv)
r = process_packet(buf);
if (r <= 0)
continue;
- sendto(udps, buf, r, 0, &lsa->sa, fromlen);
+ sendto(udps, buf, r, 0, &lsa->u.sa, fromlen);
}
return 0;
}