introduce setsockopt_reuseaddr(int fd), setsockopt_broadcast(int fd),
use them where appropriate. 200 bytes saved
diff --git a/networking/dnsd.c b/networking/dnsd.c
index 6f9dc5d..5e9cf52 100644
--- a/networking/dnsd.c
+++ b/networking/dnsd.c
@@ -200,12 +200,9 @@
struct sockaddr_in a;
char msg[100];
int s;
- int yes = 1;
s = xsocket(PF_INET, SOCK_DGRAM, 0);
-#ifdef SO_REUSEADDR
- if (setsockopt(s, SOL_SOCKET, SO_REUSEADDR, (char *)&yes, sizeof(yes)) < 0)
+ if (setsockopt_reuseaddr(s) < 0)
bb_perror_msg_and_die("setsockopt() failed");
-#endif
memset(&a, 0, sizeof(a));
a.sin_port = htons(listen_port);
a.sin_family = AF_INET;