svn commit: trunk/busybox/networking

vda at busybox.net vda at busybox.net
Sat Jun 23 23:14:03 UTC 2007


Author: vda
Date: 2007-06-23 16:14:02 -0700 (Sat, 23 Jun 2007)
New Revision: 18903

Log:
httpd: NOMMU fixes by Alex Landau <landau_alex at yahoo.com>



Modified:
   trunk/busybox/networking/httpd.c


Changeset:
Modified: trunk/busybox/networking/httpd.c
===================================================================
--- trunk/busybox/networking/httpd.c	2007-06-23 14:56:43 UTC (rev 18902)
+++ trunk/busybox/networking/httpd.c	2007-06-23 23:14:02 UTC (rev 18903)
@@ -841,6 +841,7 @@
  * $Errors: None
  *
  ****************************************************************************/
+#if BB_MMU
 static int openServer(void)
 {
 	int fd;
@@ -850,6 +851,7 @@
 	xlisten(fd, 9);
 	return fd;
 }
+#endif
 
 /****************************************************************************
  *
@@ -1821,6 +1823,7 @@
 	close(accepted_socket);
 }
 
+#if BB_MMU
 /****************************************************************************
  *
  > $Function: miniHttpd()
@@ -1900,6 +1903,7 @@
 	} /* while (1) */
 	return 0;
 }
+#endif
 
 /* from inetd */
 static int miniHttpd_inetd(void)
@@ -2033,6 +2037,7 @@
 
 	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 @@
 			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 @@
 	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
 }




More information about the busybox-cvs mailing list