fix msvc compiling

This commit is contained in:
2025-02-22 12:57:53 -05:00
parent 9f08815a0d
commit c7681e3d02
3 changed files with 92 additions and 29 deletions

View File

@ -129,7 +129,7 @@ static uint32_t (WINAPI *next_IcmpSendEcho)(
DWORD ReplySize,
DWORD Timeout);
static struct hostent* (*WSAAPI next_gethostbyname)(const char *name);
static struct hostent* (*next_gethostbyname)(const char *name);
static const struct hook_symbol netenv_hook_syms[] = {
{
@ -579,7 +579,7 @@ static uint32_t WINAPI hook_IcmpSendEcho(
return 1;
}
static struct hostent WSAAPI *my_gethostbyname(const char *name)
static struct hostent *WSAAPI my_gethostbyname(const char *name)
{
char my_hostname[256];
gethostname(my_hostname, 256);
@ -597,4 +597,4 @@ static struct hostent WSAAPI *my_gethostbyname(const char *name)
h->h_addr_list[0][2] = (char)(netenv_ip_iface >> 8);
h->h_addr_list[0][3] = (char)netenv_ip_iface;
return h;
}
}