diff options
author | Bernhard Reutner-Fischer <rep.dot.nop@gmail.com> | 2008-01-29 10:33:34 +0000 |
---|---|---|
committer | Bernhard Reutner-Fischer <rep.dot.nop@gmail.com> | 2008-01-29 10:33:34 +0000 |
commit | 8c69afd992d7cc6c2fc7dea59c3c2bd3f3c21f15 (patch) | |
tree | 998a337ecd57b737423a3793365519213f97da72 /networking/dnsd.c | |
parent | c882f341cec8451ee87af6746abb7208272d5b1a (diff) | |
download | busybox-w32-8c69afd992d7cc6c2fc7dea59c3c2bd3f3c21f15.tar.gz busybox-w32-8c69afd992d7cc6c2fc7dea59c3c2bd3f3c21f15.tar.bz2 busybox-w32-8c69afd992d7cc6c2fc7dea59c3c2bd3f3c21f15.zip |
- 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.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/networking/dnsd.c b/networking/dnsd.c index 19720d6bc..5e7886167 100644 --- a/networking/dnsd.c +++ b/networking/dnsd.c | |||
@@ -371,11 +371,11 @@ int dnsd_main(int argc, char **argv) | |||
371 | #endif | 371 | #endif |
372 | 372 | ||
373 | lsa = xdotted2sockaddr(listen_interface, port); | 373 | lsa = xdotted2sockaddr(listen_interface, port); |
374 | udps = xsocket(lsa->sa.sa_family, SOCK_DGRAM, 0); | 374 | udps = xsocket(lsa->u.sa.sa_family, SOCK_DGRAM, 0); |
375 | xbind(udps, &lsa->sa, lsa->len); | 375 | xbind(udps, &lsa->u.sa, lsa->len); |
376 | /* xlisten(udps, 50); - ?!! DGRAM sockets are never listened on I think? */ | 376 | /* xlisten(udps, 50); - ?!! DGRAM sockets are never listened on I think? */ |
377 | bb_info_msg("Accepting UDP packets on %s", | 377 | bb_info_msg("Accepting UDP packets on %s", |
378 | xmalloc_sockaddr2dotted(&lsa->sa)); | 378 | xmalloc_sockaddr2dotted(&lsa->u.sa)); |
379 | 379 | ||
380 | while (1) { | 380 | while (1) { |
381 | int r; | 381 | int r; |
@@ -385,7 +385,7 @@ int dnsd_main(int argc, char **argv) | |||
385 | // Or else we can exhibit usual UDP ugliness: | 385 | // Or else we can exhibit usual UDP ugliness: |
386 | // [ip1.multihomed.ip2] <= query to ip1 <= peer | 386 | // [ip1.multihomed.ip2] <= query to ip1 <= peer |
387 | // [ip1.multihomed.ip2] => reply from ip2 => peer (confused) | 387 | // [ip1.multihomed.ip2] => reply from ip2 => peer (confused) |
388 | r = recvfrom(udps, buf, sizeof(buf), 0, &lsa->sa, &fromlen); | 388 | r = recvfrom(udps, buf, sizeof(buf), 0, &lsa->u.sa, &fromlen); |
389 | if (OPT_verbose) | 389 | if (OPT_verbose) |
390 | bb_info_msg("Got UDP packet"); | 390 | bb_info_msg("Got UDP packet"); |
391 | if (r < 12 || r > 512) { | 391 | if (r < 12 || r > 512) { |
@@ -395,7 +395,7 @@ int dnsd_main(int argc, char **argv) | |||
395 | r = process_packet(buf); | 395 | r = process_packet(buf); |
396 | if (r <= 0) | 396 | if (r <= 0) |
397 | continue; | 397 | continue; |
398 | sendto(udps, buf, r, 0, &lsa->sa, fromlen); | 398 | sendto(udps, buf, r, 0, &lsa->u.sa, fromlen); |
399 | } | 399 | } |
400 | return 0; | 400 | return 0; |
401 | } | 401 | } |