Merge pull request #2317 from risa2000/patch-1

Fixed compiler error when building on Windows with #define UNICODE
This commit is contained in:
Gabi Melman 2022-03-24 06:45:08 +02:00 committed by GitHub
commit a49456f7f2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -64,7 +64,7 @@ public:
addr_.sin_family = PF_INET;
addr_.sin_port = htons(port);
addr_.sin_addr.s_addr = INADDR_ANY;
if (InetPton(PF_INET, TEXT(host.c_str()), &addr_.sin_addr.s_addr) != 1)
if (InetPtonA(PF_INET, host.c_str(), &addr_.sin_addr.s_addr) != 1)
{
int last_error = ::WSAGetLastError();
::WSACleanup();