mirror of
https://github.com/libretro/RetroArch
synced 2025-02-28 03:39:59 +00:00
(netplay.c) Use socket_bind
This commit is contained in:
parent
004d9a613c
commit
f4762f6f33
@ -136,7 +136,7 @@ static bool cmd_init_network(rarch_cmd_t *handle, uint16_t port)
|
||||
if (!socket_nonblock(handle->net_fd))
|
||||
goto error;
|
||||
|
||||
if (!socket_bind(handle->net_fd, res))
|
||||
if (!socket_bind(handle->net_fd, (void*)res))
|
||||
{
|
||||
RARCH_ERR("Failed to bind socket.\n");
|
||||
goto error;
|
||||
|
@ -667,10 +667,7 @@ static int init_tcp_connection(const struct addrinfo *res,
|
||||
}
|
||||
else
|
||||
{
|
||||
int yes = 1;
|
||||
setsockopt(fd, SOL_SOCKET, SO_REUSEADDR, (const char*)&yes, sizeof(int));
|
||||
|
||||
if (bind(fd, res->ai_addr, res->ai_addrlen) < 0 ||
|
||||
if ( !socket_bind(fd, (void*)res) ||
|
||||
listen(fd, spectate ? MAX_SPECTATORS : 1) < 0)
|
||||
{
|
||||
ret = false;
|
||||
|
Loading…
x
Reference in New Issue
Block a user