From 79e75bfbb9a62b0f4c996f2e43152937f8667a43 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Thu, 10 Aug 2017 13:20:51 +0200 Subject: [PATCH] net/SocketDescriptor: cast setsockopt() value to "const char *" for Windows --- src/net/SocketDescriptor.cxx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/net/SocketDescriptor.cxx b/src/net/SocketDescriptor.cxx index 3600b55e7..e0cf9d56a 100644 --- a/src/net/SocketDescriptor.cxx +++ b/src/net/SocketDescriptor.cxx @@ -202,7 +202,8 @@ SocketDescriptor::SetOption(int level, int name, { assert(IsDefined()); - return setsockopt(fd, level, name, value, size) == 0; + /* on Windows, setsockopt() wants "const char *" */ + return setsockopt(fd, level, name, (const char *)value, size) == 0; } #ifdef __linux__