Merge pull request #6912 from John-He-928/mingw-build

fix mingw32/mingw64 compiling
This commit is contained in:
minggo 2014-05-28 10:00:59 +08:00
commit 25c045eed8
2 changed files with 2 additions and 1 deletions

View File

@ -99,6 +99,7 @@ endif()
if(MINGW)
add_definitions(-DGLEW_STATIC)
add_definitions(-D__SSIZE_T)
endif()

View File

@ -194,7 +194,7 @@ static const char* inet_ntop(int af, const void* src, char* dst, int cnt)
memcpy(&(srcaddr.sin_addr), src, sizeof(srcaddr.sin_addr));
srcaddr.sin_family = af;
if (WSAAddressToString((struct sockaddr*) &srcaddr, sizeof(struct sockaddr_in), 0, dst, (LPDWORD) &cnt) != 0)
if (WSAAddressToStringA((struct sockaddr*) &srcaddr, sizeof(struct sockaddr_in), 0, dst, (LPDWORD) &cnt) != 0)
{
return nullptr;
}