From 722d8d0c6265705c9ca730d8d037301acf213c3c Mon Sep 17 00:00:00 2001 From: Max Lv Date: Thu, 11 Aug 2016 15:17:21 +0800 Subject: [PATCH] Fix build on Linux --- src/local.c | 1 - src/netutils.h | 6 ++++++ src/redir.c | 1 - src/server.c | 1 - src/tunnel.c | 1 - src/udprelay.c | 1 - 6 files changed, 6 insertions(+), 5 deletions(-) diff --git a/src/local.c b/src/local.c index 09f77dda..d30bf543 100644 --- a/src/local.c +++ b/src/local.c @@ -39,7 +39,6 @@ #include #include #include -#include #include #endif diff --git a/src/netutils.h b/src/netutils.h index 92fb0c17..298f7f48 100644 --- a/src/netutils.h +++ b/src/netutils.h @@ -23,6 +23,12 @@ #ifndef _NETUTILS_H #define _NETUTILS_H +#if defined(__linux__) +#include +#else +#include +#endif + // only enable TCP_FASTOPEN on linux #if defined(__linux__) diff --git a/src/redir.c b/src/redir.c index 05a3671a..ac38fb91 100644 --- a/src/redir.c +++ b/src/redir.c @@ -29,7 +29,6 @@ #include #include #include -#include #include #include #include diff --git a/src/server.c b/src/server.c index 5a2018b1..0dd5d61b 100644 --- a/src/server.c +++ b/src/server.c @@ -42,7 +42,6 @@ #include #include #include -#include #include #include #endif diff --git a/src/tunnel.c b/src/tunnel.c index f7f7e4cf..e1c92b0a 100644 --- a/src/tunnel.c +++ b/src/tunnel.c @@ -35,7 +35,6 @@ #include #include #include -#include #include #endif diff --git a/src/udprelay.c b/src/udprelay.c index f91017c2..62b1ff03 100644 --- a/src/udprelay.c +++ b/src/udprelay.c @@ -35,7 +35,6 @@ #include #include #include -#include #include #endif