* 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>
#include <sys/types.h>
#include <sys/socket.h>
-
+#include <netinet/tcp.h>
#include <netdb.h>
#include "uhttpd.h"
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));