From b979af0a8c352df3be5136d00ca83d5c1af2cf88 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Sun, 1 May 2016 23:00:54 +0200 Subject: [PATCH] (netplay.c) Reuse it another time --- netplay/netplay.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/netplay/netplay.c b/netplay/netplay.c index cbf9113929..579f796a0f 100644 --- a/netplay/netplay.c +++ b/netplay/netplay.c @@ -770,13 +770,7 @@ static bool init_udp_socket(netplay_t *netplay, const char *server, if (!server) { /* Not sure if we have to do this for UDP, but hey :) */ - int yes = 1; - - setsockopt(netplay->udp_fd, SOL_SOCKET, SO_REUSEADDR, - (const char*)&yes, sizeof(int)); - - if (bind(netplay->udp_fd, netplay->addr->ai_addr, - netplay->addr->ai_addrlen) < 0) + if (!socket_bind(netplay->udp_fd, (void*)netplay->addr)) { RARCH_ERR("Failed to bind socket.\n"); socket_close(netplay->udp_fd);