From 60837a7cfb934d7ae1906f4c4992159c1f84526b Mon Sep 17 00:00:00 2001 From: Kp Date: Sun, 2 Nov 2014 17:05:10 +0000 Subject: [PATCH] Fix -fno-inline build by promoting INVALID_SOCKET to global scope --- similar/main/net_udp.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/similar/main/net_udp.cpp b/similar/main/net_udp.cpp index 2aa471697..b509266eb 100644 --- a/similar/main/net_udp.cpp +++ b/similar/main/net_udp.cpp @@ -127,11 +127,14 @@ static const int require_tracker_socket = 0; static fix64 StartAbortMenuTime; +#ifndef _WIN32 +const int INVALID_SOCKET = -1; +#endif + struct RAIIsocket { #ifndef _WIN32 typedef int SOCKET; - static const int INVALID_SOCKET = -1; int closesocket(SOCKET s) { return close(s);