summaryrefslogtreecommitdiffstats
path: root/nanohttp
diff options
context:
space:
mode:
Diffstat (limited to 'nanohttp')
-rw-r--r--nanohttp/nanohttp-admin.c4
-rwxr-xr-xnanohttp/nanohttp-response.c4
-rw-r--r--nanohttp/nanohttp-socket.c2
3 files changed, 7 insertions, 3 deletions
diff --git a/nanohttp/nanohttp-admin.c b/nanohttp/nanohttp-admin.c
index 91ad0f0..76b0e06 100644
--- a/nanohttp/nanohttp-admin.c
+++ b/nanohttp/nanohttp-admin.c
@@ -160,8 +160,8 @@ _httpd_admin_list_statistics(httpd_conn_t *conn, const char *service_name)
service->statistics->requests,
service->statistics->bytes_received,
service->statistics->bytes_transmitted,
- service->statistics->time.tv_sec,
- service->statistics->time.tv_usec);
+ (long int)service->statistics->time.tv_sec,
+ (long int)service->statistics->time.tv_usec);
pthread_rwlock_unlock(&(service->statistics->lock));
http_output_stream_write_string(conn->out, buffer);
diff --git a/nanohttp/nanohttp-response.c b/nanohttp/nanohttp-response.c
index 54c05dc..d5592c6 100755
--- a/nanohttp/nanohttp-response.c
+++ b/nanohttp/nanohttp-response.c
@@ -46,6 +46,10 @@
#include <netinet/in.h>
#endif
+#ifndef strtok_r
+extern char* strtok_r(char*, const char*, char**);
+#endif
+
#include "nanohttp-logging.h"
#include "nanohttp-error.h"
#include "nanohttp-common.h"
diff --git a/nanohttp/nanohttp-socket.c b/nanohttp/nanohttp-socket.c
index b7ae905..0f4f2f4 100644
--- a/nanohttp/nanohttp-socket.c
+++ b/nanohttp/nanohttp-socket.c
@@ -301,7 +301,7 @@ hsocket_bind(struct hsocket_t *dsock, unsigned short port)
"Socket error (%s)", strerror(errno));
}
- setsockopt(sock.sock, SOL_SOCKET, SO_REUSEADDR, &opt, sizeof(opt));
+ setsockopt(sock.sock, SOL_SOCKET, SO_REUSEADDR, (const void*)&opt, sizeof(opt));
/* bind socket */
addr.sin_family = AF_INET;
addr.sin_port = htons(port);