fix compile errors
authorFelix Fietkau <nbd@openwrt.org>
Sun, 30 Dec 2012 18:58:45 +0000 (19:58 +0100)
committerFelix Fietkau <nbd@openwrt.org>
Sun, 30 Dec 2012 18:58:48 +0000 (19:58 +0100)
file.c
listen.c

diff --git a/file.c b/file.c
index f1f5d6d9eb210f349b8f164b4c5e27e6e1b8da1f..5ba659f4e082c77a17446b8bd7baf91e457c0f74 100644 (file)
--- a/file.c
+++ b/file.c
  *  limitations under the License.
  */
 
+#define _BSD_SOURCE
+#define _XOPEN_SOURCE 700
+
 #include <sys/types.h>
 #include <sys/dir.h>
+#include <time.h>
+#include <strings.h>
 
 #include <libubox/blobmsg.h>
 
index 74a85f9149470188be1f20b7a2a4ecc74dfad7f0..b4d51e1708ec4c9158d41a6914d08159d0d7f5c6 100644 (file)
--- a/listen.c
+++ b/listen.c
@@ -19,7 +19,7 @@
 
 #include <sys/types.h>
 #include <sys/socket.h>
-
+#include <netinet/tcp.h>
 #include <netdb.h>
 
 #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));