net/SocketDescriptor: cast setsockopt() value to "const char *" for Windows

This commit is contained in:
Max Kellermann 2017-08-10 13:20:51 +02:00
parent 73b15c1bee
commit 79e75bfbb9

View File

@ -202,7 +202,8 @@ SocketDescriptor::SetOption(int level, int name,
{ {
assert(IsDefined()); 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__ #ifdef __linux__