From cf7e56655bc3683c355eda8b90359f8c903cede7 Mon Sep 17 00:00:00 2001 From: David du Colombier <0intro@gmail.com> Date: Sun, 3 Aug 2014 18:19:36 +0200 Subject: [PATCH] initialize socklen --- net.c | 1 + 1 file changed, 1 insertion(+) diff --git a/net.c b/net.c index 3cc3cdd..69f87d6 100644 --- a/net.c +++ b/net.c @@ -59,6 +59,7 @@ netannounce(int istcp, char *server, int port) } /* set reuse flag for tcp */ + sn = sizeof n; if(istcp && getsockopt(fd, SOL_SOCKET, SO_TYPE, (void*)&n, &sn) >= 0){ n = 1; setsockopt(fd, SOL_SOCKET, SO_REUSEADDR, (char*)&n, sizeof n);