Changed grpc_inet_ntop signature to match Windows function
diff --git a/src/core/lib/iomgr/socket_utils.h b/src/core/lib/iomgr/socket_utils.h
index f0b5a33..7990357 100644
--- a/src/core/lib/iomgr/socket_utils.h
+++ b/src/core/lib/iomgr/socket_utils.h
@@ -43,7 +43,7 @@
#endif
/* A wrapper for inet_ntop on POSIX systems and InetNtop on Windows systems */
-const char *grpc_inet_ntop(int af, const void *src,
+const char *grpc_inet_ntop(int af, void *src,
char *dst, socklen_t size);
#endif /* GRPC_CORE_LIB_IOMGR_SOCKET_UTILS_H */
diff --git a/src/core/lib/iomgr/socket_utils_common_posix.c b/src/core/lib/iomgr/socket_utils_common_posix.c
index 2143256..42ee76d 100644
--- a/src/core/lib/iomgr/socket_utils_common_posix.c
+++ b/src/core/lib/iomgr/socket_utils_common_posix.c
@@ -297,9 +297,9 @@
return error_for_fd(*newfd, addr);
}
-const char *grpc_inet_ntop(int af, const void *src,
+const char *grpc_inet_ntop(int af, void *src,
char *dst, socklen_t size) {
- return inet_ntop(af, src, dst, size);
+ return inet_ntop(af, (const void*)src, dst, size);
}
#endif
diff --git a/src/core/lib/iomgr/socket_utils_windows.c b/src/core/lib/iomgr/socket_utils_windows.c
index c65812f..c1dfc6e 100644
--- a/src/core/lib/iomgr/socket_utils_windows.c
+++ b/src/core/lib/iomgr/socket_utils_windows.c
@@ -39,7 +39,7 @@
#include <grpc/support/log.h>
-const char *grpc_inet_ntop(int af, const void *src,
+const char *grpc_inet_ntop(int af, void *src,
char *dst, socklen_t size) {
GPR_ASSERT(sizeof(socklen_t) <= sizeof(size_t));
return InetNtopA(af, src, dst, (size_t)size);