diff --git a/include/uv.h b/include/uv.h index ba8098649..ef2f840d7 100644 --- a/include/uv.h +++ b/include/uv.h @@ -429,8 +429,8 @@ typedef void (*uv_getaddrinfo_cb)(uv_getaddrinfo_t* req, struct addrinfo* res); typedef void (*uv_getnameinfo_cb)(uv_getnameinfo_t* req, int status, - char* hostname, - char* service); + const char* hostname, + const char* service); typedef struct { long tv_sec; diff --git a/test/test-getnameinfo.c b/test/test-getnameinfo.c index 707fce014..1ea0f3a43 100644 --- a/test/test-getnameinfo.c +++ b/test/test-getnameinfo.c @@ -36,8 +36,8 @@ static uv_getnameinfo_t req; static void getnameinfo_req(uv_getnameinfo_t* handle, int status, - char* hostname, - char* service) { + const char* hostname, + const char* service) { ASSERT(handle != NULL); ASSERT(status == 0); ASSERT(hostname != NULL); diff --git a/test/test-threadpool-cancel.c b/test/test-threadpool-cancel.c index 0c8fd1465..d852e488b 100644 --- a/test/test-threadpool-cancel.c +++ b/test/test-threadpool-cancel.c @@ -129,8 +129,8 @@ static void getaddrinfo_cb(uv_getaddrinfo_t* req, static void getnameinfo_cb(uv_getnameinfo_t* handle, int status, - char* hostname, - char* service) { + const char* hostname, + const char* service) { ASSERT(status == UV_EAI_CANCELED); ASSERT(hostname == NULL); ASSERT(service == NULL);