mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-03-30 10:15:52 +00:00
fix windows build
This commit is contained in:
parent
52885dfc1d
commit
6a9a61c79f
@ -34,6 +34,8 @@
|
||||
#include <esl.h>
|
||||
#ifndef WIN32
|
||||
#define closesocket(x) close(x)
|
||||
#else
|
||||
#include <Ws2tcpip.h>
|
||||
#endif
|
||||
|
||||
|
||||
@ -636,6 +638,7 @@ ESL_DECLARE(esl_status_t) esl_connect(esl_handle_t *handle, const char *host, es
|
||||
hints.ai_family = AF_INET;
|
||||
hints.ai_socktype = SOCK_STREAM;
|
||||
|
||||
gethostbyname(host);
|
||||
if (getaddrinfo(host, NULL, &hints, &result)) {
|
||||
strncpy(handle->err, "Cannot resolve host", sizeof(handle->err));
|
||||
goto fail;
|
||||
|
Loading…
x
Reference in New Issue
Block a user