aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/lib/iomgr/socket_utils_windows.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/lib/iomgr/socket_utils_windows.c')
-rw-r--r--src/core/lib/iomgr/socket_utils_windows.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/core/lib/iomgr/socket_utils_windows.c b/src/core/lib/iomgr/socket_utils_windows.c
index c1dfc6e96f..41e53bd812 100644
--- a/src/core/lib/iomgr/socket_utils_windows.c
+++ b/src/core/lib/iomgr/socket_utils_windows.c
@@ -39,10 +39,11 @@
#include <grpc/support/log.h>
-const char *grpc_inet_ntop(int af, void *src,
+const char *grpc_inet_ntop(int af, const void *src,
char *dst, socklen_t size) {
GPR_ASSERT(sizeof(socklen_t) <= sizeof(size_t));
- return InetNtopA(af, src, dst, (size_t)size);
+ /* Windows InetNtopA wants a mutable ip pointer */
+ return InetNtopA(af, (void*)src, dst, (size_t)size);
}
#endif /* GRPC_WINDOWS_SOCKETUTILS */