fix compile errors on linux
[project/uhttpd.git] / main.c
diff --git a/main.c b/main.c
index f61574f..26dc55c 100644 (file)
--- a/main.c
+++ b/main.c
@@ -17,6 +17,8 @@
  *  limitations under the License.
  */
 
+#define _GNU_SOURCE
+#define _XOPEN_SOURCE  700
 #include <sys/types.h>
 #include <sys/socket.h>
 #include <netinet/in.h>
@@ -25,6 +27,7 @@
 #include <errno.h>
 #include <netdb.h>
 #include <signal.h>
+#include <unistd.h>
 
 #include <libubox/usock.h>
 
@@ -158,7 +161,7 @@ static void init_defaults(void)
 {
        conf.script_timeout = 60;
        conf.network_timeout = 30;
-       conf.http_keepalive = 0; /* fixme */
+       conf.http_keepalive = 20;
        conf.max_requests = 3;
        conf.realm = "Protected Area";
        conf.cgi_prefix = "/cgi-bin";