Browse Source

Fix build on Linux

pull/773/head
Max Lv 8 years ago
parent
commit
722d8d0c62
6 changed files with 6 additions and 5 deletions
  1. 1
      src/local.c
  2. 6
      src/netutils.h
  3. 1
      src/redir.c
  4. 1
      src/server.c
  5. 1
      src/tunnel.c
  6. 1
      src/udprelay.c

1
src/local.c

@ -39,7 +39,6 @@
#include <arpa/inet.h>
#include <netdb.h>
#include <netinet/in.h>
#include <netinet/tcp.h>
#include <pthread.h>
#endif

6
src/netutils.h

@ -23,6 +23,12 @@
#ifndef _NETUTILS_H
#define _NETUTILS_H
#if defined(__linux__)
#include <linux/tcp.h>
#else
#include <netinet/tcp.h>
#endif
// only enable TCP_FASTOPEN on linux
#if defined(__linux__)

1
src/redir.c

@ -29,7 +29,6 @@
#include <locale.h>
#include <netdb.h>
#include <netinet/in.h>
#include <netinet/tcp.h>
#include <pthread.h>
#include <signal.h>
#include <string.h>

1
src/server.c

@ -42,7 +42,6 @@
#include <arpa/inet.h>
#include <netdb.h>
#include <netinet/in.h>
#include <netinet/tcp.h>
#include <pthread.h>
#include <sys/un.h>
#endif

1
src/tunnel.c

@ -35,7 +35,6 @@
#include <arpa/inet.h>
#include <netdb.h>
#include <netinet/in.h>
#include <netinet/tcp.h>
#include <pthread.h>
#endif

1
src/udprelay.c

@ -35,7 +35,6 @@
#include <errno.h>
#include <netdb.h>
#include <netinet/in.h>
#include <netinet/tcp.h>
#include <pthread.h>
#endif

Loading…
Cancel
Save