Skip to content

Commit

Permalink
dgram, bugfix: compile error on windows.
Browse files Browse the repository at this point in the history
  • Loading branch information
xicilion committed Jan 8, 2018
1 parent e4eb495 commit dfd063c
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions fibjs/src/net/DgramSocket.cpp
Expand Up @@ -389,7 +389,7 @@ result_t DgramSocket::getRecvBufferSize(int32_t& retVal)
return CHECK_ERROR(CALL_E_INVALID_CALL);

socklen_t len = sizeof(retVal);
if (::getsockopt(m_aio.m_fd, SOL_SOCKET, SO_RCVBUF, &retVal, &len) == SOCKET_ERROR)
if (::getsockopt(m_aio.m_fd, SOL_SOCKET, SO_RCVBUF, (char*)&retVal, &len) == SOCKET_ERROR)
return CHECK_ERROR(SocketError());

return 0;
Expand All @@ -401,7 +401,7 @@ result_t DgramSocket::getSendBufferSize(int32_t& retVal)
return CHECK_ERROR(CALL_E_INVALID_CALL);

socklen_t len = sizeof(retVal);
if (::getsockopt(m_aio.m_fd, SOL_SOCKET, SO_SNDBUF, &retVal, &len) == SOCKET_ERROR)
if (::getsockopt(m_aio.m_fd, SOL_SOCKET, SO_SNDBUF, (char*)&retVal, &len) == SOCKET_ERROR)
return CHECK_ERROR(SocketError());

return 0;
Expand All @@ -412,7 +412,7 @@ result_t DgramSocket::setRecvBufferSize(int32_t size)
if (m_closed)
return CHECK_ERROR(CALL_E_INVALID_CALL);

if (::setsockopt(m_aio.m_fd, SOL_SOCKET, SO_RCVBUF, &size, sizeof(size)) == SOCKET_ERROR)
if (::setsockopt(m_aio.m_fd, SOL_SOCKET, SO_RCVBUF, (char*)&size, sizeof(size)) == SOCKET_ERROR)
return CHECK_ERROR(SocketError());

return 0;
Expand All @@ -423,7 +423,7 @@ result_t DgramSocket::setSendBufferSize(int32_t size)
if (m_closed)
return CHECK_ERROR(CALL_E_INVALID_CALL);

if (::setsockopt(m_aio.m_fd, SOL_SOCKET, SO_SNDBUF, &size, sizeof(size)) == SOCKET_ERROR)
if (::setsockopt(m_aio.m_fd, SOL_SOCKET, SO_SNDBUF, (char*)&size, sizeof(size)) == SOCKET_ERROR)
return CHECK_ERROR(SocketError());

return 0;
Expand Down

0 comments on commit dfd063c

Please sign in to comment.