diff options
author | Denis Vlasenko | 2007-06-23 23:14:02 +0000 |
---|---|---|
committer | Denis Vlasenko | 2007-06-23 23:14:02 +0000 |
commit | 56258b688cc4fb2a5cfacb4e7a17fe51e158c101 (patch) | |
tree | b82b6e99e6212de42e212959273ae90987536448 | |
parent | 198badafd82905c9a2e76eeacb7ce463d8518bda (diff) | |
download | busybox-56258b688cc4fb2a5cfacb4e7a17fe51e158c101.zip busybox-56258b688cc4fb2a5cfacb4e7a17fe51e158c101.tar.gz |
httpd: NOMMU fixes by Alex Landau <landau_alex@yahoo.com>
-rw-r--r-- | networking/httpd.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/networking/httpd.c b/networking/httpd.c index 529f66b..8c0a83e 100644 --- a/networking/httpd.c +++ b/networking/httpd.c @@ -841,6 +841,7 @@ static void decodeBase64(char *Data) * $Errors: None * ****************************************************************************/ +#if BB_MMU static int openServer(void) { int fd; @@ -850,6 +851,7 @@ static int openServer(void) xlisten(fd, 9); return fd; } +#endif /**************************************************************************** * @@ -1821,6 +1823,7 @@ static void handleIncoming(void) close(accepted_socket); } +#if BB_MMU /**************************************************************************** * > $Function: miniHttpd() @@ -1900,6 +1903,7 @@ static int miniHttpd(int server) } /* while (1) */ return 0; } +#endif /* from inetd */ static int miniHttpd_inetd(void) @@ -2033,6 +2037,7 @@ int httpd_main(int argc, char **argv) xchdir(home_httpd); if (!(opt & OPT_INETD)) { +#if BB_MMU signal(SIGCHLD, SIG_IGN); server_socket = openServer(); #if ENABLE_FEATURE_HTTPD_SETUID @@ -2046,6 +2051,9 @@ int httpd_main(int argc, char **argv) xsetuid(ugid.uid); } #endif +#else /* BB_MMU */ + bb_error_msg_and_die("-i is required"); +#endif } #if ENABLE_FEATURE_HTTPD_CGI @@ -2069,7 +2077,11 @@ int httpd_main(int argc, char **argv) if (opt & OPT_INETD) return miniHttpd_inetd(); +#if BB_MMU if (!(opt & OPT_FOREGROUND)) bb_daemonize(0); /* don't change current directory */ return miniHttpd(server_socket); +#else + return 0; /* not reached */ +#endif } |