From: Felix Fietkau Date: Sun, 30 Dec 2012 18:58:45 +0000 (+0100) Subject: fix compile errors X-Git-Url: http://git.cdn.openwrt.org/?a=commitdiff_plain;h=d364884471614988e500e2d5412f7aeac00eb9d2;p=project%2Fuhttpd.git fix compile errors --- diff --git a/file.c b/file.c index f1f5d6d..5ba659f 100644 --- a/file.c +++ b/file.c @@ -17,8 +17,13 @@ * limitations under the License. */ +#define _BSD_SOURCE +#define _XOPEN_SOURCE 700 + #include #include +#include +#include #include diff --git a/listen.c b/listen.c index 74a85f9..b4d51e1 100644 --- a/listen.c +++ b/listen.c @@ -19,7 +19,7 @@ #include #include - +#include #include #include "uhttpd.h" @@ -124,7 +124,7 @@ int uh_socket_bind(const char *host, const char *port, bool tls) tcp_ka_idl = 1; tcp_ka_cnt = 3; - tcp_ka_int = conf->tcp_keepalive; + tcp_ka_int = conf.tcp_keepalive; ret = setsockopt(sock, SOL_TCP, TCP_KEEPIDLE, &tcp_ka_idl, sizeof(tcp_ka_idl)) || setsockopt(sock, SOL_TCP, TCP_KEEPINTVL, &tcp_ka_int, sizeof(tcp_ka_int)) || setsockopt(sock, SOL_TCP, TCP_KEEPCNT, &tcp_ka_cnt, sizeof(tcp_ka_cnt));