From 53a55da7bc13d715d1072b12f464393d2960fd13 Mon Sep 17 00:00:00 2001 From: Sergey Lyubka Date: Mon, 16 Feb 2015 18:19:15 +0000 Subject: [PATCH] Add type cast in ns_out() --- mongoose.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/mongoose.c b/mongoose.c index 7c1d7e2c..c73c855f 100644 --- a/mongoose.c +++ b/mongoose.c @@ -377,7 +377,8 @@ void iobuf_remove(struct iobuf *io, size_t n) { static size_t ns_out(struct ns_connection *nc, const void *buf, size_t len) { if (nc->flags & NSF_UDP) { - long n = sendto(nc->sock, buf, len, 0, &nc->sa.sa, sizeof(nc->sa.sin)); + long n = sendto(nc->sock, (const char *) buf, len, 0, &nc->sa.sa, + sizeof(nc->sa.sin)); DBG(("%p %d send %ld (%d %s)", nc, nc->sock, n, errno, strerror(errno))); return n < 0 ? 0 : n; } else {