From 099ed50f911b61a1591a319df0d16ce0faaa5769 Mon Sep 17 00:00:00 2001 From: Rob Landley Date: Mon, 28 Aug 2006 09:41:49 +0000 Subject: Unbreak allbareconfig a bit. (The telnetd.c fix is a perfect example of why applets which are a forest of #ifdefs are unmaintainable.) --- networking/inetd.c | 1 + networking/telnetd.c | 25 ++++++------------------- 2 files changed, 7 insertions(+), 19 deletions(-) (limited to 'networking') diff --git a/networking/inetd.c b/networking/inetd.c index a17d28ebf..9947f01ae 100644 --- a/networking/inetd.c +++ b/networking/inetd.c @@ -130,6 +130,7 @@ #include "busybox.h" #include +#include //#define CONFIG_FEATURE_INETD_RPC //#define CONFIG_FEATURE_INETD_SUPPORT_BUILTIN_ECHO diff --git a/networking/telnetd.c b/networking/telnetd.c index 9f0eedcc8..87f44ce51 100644 --- a/networking/telnetd.c +++ b/networking/telnetd.c @@ -24,28 +24,15 @@ /*#define DEBUG 1 */ #undef DEBUG -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include "busybox.h" + #ifdef DEBUG #define TELCMDS #define TELOPTS #endif #include -#include #include -#include "busybox.h" #define BUFSIZE 4000 @@ -443,7 +430,7 @@ telnetd_main(int argc, char **argv) /* Grab a TCP socket. */ - master_fd = bb_xsocket(SOCKET_TYPE, SOCK_STREAM, 0); + master_fd = xsocket(SOCKET_TYPE, SOCK_STREAM, 0); (void)setsockopt(master_fd, SOL_SOCKET, SO_REUSEADDR, &on, sizeof(on)); /* Set it to listen to specified port. */ @@ -459,9 +446,9 @@ telnetd_main(int argc, char **argv) sa.sin_addr = bind_addr; #endif - bb_xbind(master_fd, (struct sockaddr *) &sa, sizeof(sa)); - bb_xlisten(master_fd, 1); - bb_xdaemon(0, 0); + xbind(master_fd, (struct sockaddr *) &sa, sizeof(sa)); + xlisten(master_fd, 1); + xdaemon(0, 0); maxfd = master_fd; #endif /* CONFIG_FEATURE_TELNETD_INETD */ -- cgit v1.2.3