From 3d197aa9f3f5583038c6bafbeff49c871b8698fa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ren=C3=A9=20Canna=C3=B2?= Date: Wed, 19 Oct 2016 15:09:56 +0000 Subject: [PATCH] Minor change to compile on Ubuntu12 --- lib/network.cpp | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/lib/network.cpp b/lib/network.cpp index 9dc38447b..542098f83 100644 --- a/lib/network.cpp +++ b/lib/network.cpp @@ -5,12 +5,11 @@ * returns the socket */ int listen_on_port(char *ip, uint16_t port, int backlog, bool reuseport) { - int arg_on = 1; - struct addrinfo hints = { - .ai_flags = AI_PASSIVE, - .ai_family = AF_UNSPEC, - .ai_socktype = SOCK_STREAM - }; + int arg_on = 1; + struct addrinfo hints; + hints.ai_flags = AI_PASSIVE; + hints.ai_family = AF_UNSPEC; + hints.ai_socktype = SOCK_STREAM; struct addrinfo *next, *ai; char port_string[NI_MAXSERV]; int sd = -1;