summaryrefslogtreecommitdiff
path: root/src/net
diff options
context:
space:
mode:
Diffstat (limited to 'src/net')
-rw-r--r--src/net/sdltcpnet.cpp19
1 files changed, 16 insertions, 3 deletions
diff --git a/src/net/sdltcpnet.cpp b/src/net/sdltcpnet.cpp
index 6ad350002..b38bc8a67 100644
--- a/src/net/sdltcpnet.cpp
+++ b/src/net/sdltcpnet.cpp
@@ -21,9 +21,24 @@
#include "net/sdltcpnet.h"
#if defined __linux__ || defined __linux
+#include "logger.h"
+
#include <sys/socket.h>
-#include <linux/tcp.h>
+#include <netinet/in.h>
+#include <netinet/tcp.h>
#include <netdb.h>
+
+#if defined(M_TCPOK) && !defined(ANDROID)
+#include <linux/tcp.h>
+#else
+// using manual hack, because in this mode linux/tcp.h compiled with errors
+#include <netinet/tcp.h>
+// Use linear timeouts for thin streams
+#define TCP_THIN_LINEAR_TIMEOUTS 16
+// Fast retrans. after 1 dupack
+#define TCP_THIN_DUPACK 17
+#endif
+
#endif
#include "debug.h"
@@ -67,8 +82,6 @@ int TcpNet::resolveHost(IPaddress *address, const char *host, Uint16 port)
return SDLNet_ResolveHost(address, host, port);
}
-#include "logger.h"
-
TcpNet::Socket TcpNet::open(IPaddress *ip)
{
TcpNet::Socket sock = SDLNet_TCP_Open(ip);