From 4f7b5fc13c6d17c2ccc01dbfd6a044d12340119e Mon Sep 17 00:00:00 2001 From: Raoul Hecky Date: Sun, 15 Jan 2017 19:31:44 +0100 Subject: [PATCH] Fix build failure when using UDPHandle::recv() Missing const fails to compile the code --- src/uvw/udp.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/uvw/udp.hpp b/src/uvw/udp.hpp index 0ce7762f..f18ee222 100644 --- a/src/uvw/udp.hpp +++ b/src/uvw/udp.hpp @@ -100,7 +100,7 @@ private: class UDPHandle final: public Handle { template static void recvCallback(uv_udp_t *handle, ssize_t nread, const uv_buf_t *buf, const sockaddr *addr, unsigned flags) { - typename details::IpTraits::Type *aptr = reinterpret_cast::Type *>(addr); + const typename details::IpTraits::Type *aptr = reinterpret_cast::Type *>(addr); UDPHandle &udp = *(static_cast(handle->data)); // data will be destroyed no matter of what the value of nread is