diff --git a/uv-unix.c b/uv-unix.c index b0e85d95..4163683c 100644 --- a/uv-unix.c +++ b/uv-unix.c @@ -122,7 +122,7 @@ static uv_err_t uv_err_new(uv_handle_t* handle, int sys_error) { } -struct sockaddr_in uv_ip4_addr(char* ip, int port) { +struct sockaddr_in uv_ip4_addr(const char* ip, int port) { struct sockaddr_in addr; addr.sin_family = AF_INET; diff --git a/uv-win.c b/uv-win.c index 6a42b4d4..e9e1bbb6 100644 --- a/uv-win.c +++ b/uv-win.c @@ -705,7 +705,7 @@ int uv_close(uv_handle_t* handle, uv_close_cb close_cb) { } -struct sockaddr_in uv_ip4_addr(char* ip, int port) { +struct sockaddr_in uv_ip4_addr(const char* ip, int port) { struct sockaddr_in addr; addr.sin_family = AF_INET; diff --git a/uv.h b/uv.h index 491e4676..2806cc29 100644 --- a/uv.h +++ b/uv.h @@ -367,7 +367,7 @@ int64_t uv_now(); /* Utility */ -struct sockaddr_in uv_ip4_addr(char* ip, int port); +struct sockaddr_in uv_ip4_addr(const char* ip, int port); /* Gets the executable path */ int uv_get_exepath(char* buffer, size_t* size);