Skip to content

Commit 7d9fa2b

Browse files
committed
fix win32 build errors
1 parent 04394e6 commit 7d9fa2b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

win32.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ enet_address_get_host_ip (const ENetAddress * address, char * name, size_t nameL
100100
#ifdef HAS_INET_NTOP
101101
if (inet_ntop (AF_INET6, & address -> host, name, nameLength) == NULL)
102102
#else
103-
char * addr = inet_ntoa (* (struct in6_addr *) & address -> host);
103+
char * addr = inet_ntoa (* (struct in_addr *) & address -> host);
104104
if (addr != NULL)
105105
{
106106
size_t addrLen = strlen(addr);
@@ -132,7 +132,7 @@ enet_address_get_host (const ENetAddress * address, char * name, size_t nameLeng
132132
hostEntry = gethostbyaddr_r ((char *) & in, sizeof (struct in6_addr), AF_INET6, & hostData, buffer, sizeof (buffer), & errnum);
133133
#endif
134134
#else
135-
in.s_addr = address -> host;
135+
in = address -> host;
136136

137137
hostEntry = gethostbyaddr ((char *) & in, sizeof (struct in6_addr), AF_INET6);
138138
#endif

0 commit comments

Comments
 (0)