Skip to content

Commit

Permalink
C89_BUILD fix
Browse files Browse the repository at this point in the history
  • Loading branch information
inactive123 committed Aug 16, 2017
1 parent c08fc10 commit e56250c
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions network/netplay/netplay_discovery.c
Original file line number Diff line number Diff line change
Expand Up @@ -348,16 +348,19 @@ static bool netplay_lan_ad_client(void)
/* And that we know how to handle it */
if (their_addr.sa_family == AF_INET)
{
struct sockaddr_in *sin = NULL;

RARCH_WARN ("[lobby] using IPv4 for discovery\n");
struct sockaddr_in *sin = (struct sockaddr_in *) &their_addr;
sin = (struct sockaddr_in *) &their_addr;
sin->sin_port = htons(ntohl(ad_packet_buffer.port));

}
#ifdef HAVE_INET6
else if (their_addr.sa_family == AF_INET6)
{
struct sockaddr_in6 *sin6 = NULL;
RARCH_WARN ("[lobby] using IPv6 for discovery\n");
struct sockaddr_in6 *sin6 = (struct sockaddr_in6 *) &their_addr;
sin6 = (struct sockaddr_in6 *) &their_addr;
sin6->sin6_port = htons(ad_packet_buffer.port);

}
Expand Down

0 comments on commit e56250c

Please sign in to comment.