This commit is contained in:
Max Lv
2017-02-23 09:35:12 +08:00
parent 48c9abe3a5
commit 44b0eae3ef
10 changed files with 58 additions and 13 deletions
+2 -1
View File
@@ -225,7 +225,8 @@ AC_DEFINE([HAVE_IPv6], [1], [Enable IPv6 support in libudns])
AC_CHECK_HEADERS([udns.h], [], [AC_MSG_ERROR([Couldn't find libudns. Try installing libudns-dev or udns-devel.])])
AC_CHECK_LIB([udns], [dns_dnlen], [LIBS="-ludns $LIBS"], [AC_MSG_ERROR([Couldn't find libudns. Try installing libudns-dev or udns-devel.])])
AC_CHECK_HEADERS([ev.h], [], [AC_MSG_ERROR([Couldn't find libev. Try installing libev-dev@<:@el@:>@.])])
AC_CHECK_HEADERS([ev.h libev/ev.h], [], [])
AC_CHECK_LIB([ev], [ev_loop_destroy], [LIBS="-lev $LIBS"], [AC_MSG_ERROR([Couldn't find libev. Try installing libev-dev@<:@el@:>@.])])
AC_CONFIG_FILES([shadowsocks-libev.pc
+4
View File
@@ -25,6 +25,10 @@
* License: This is licensed under the same terms as uthash itself
*/
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#include <errno.h>
#include <stdlib.h>
+6 -1
View File
@@ -29,7 +29,12 @@
#define _CACHE_
#include "uthash.h"
#include "ev.h"
#ifdef HAVE_LIBEV_EV_H
#include <libev/ev.h>
#else
#include <ev.h>
#endif
/**
* A cache entry
+6 -1
View File
@@ -23,9 +23,14 @@
#ifndef _LOCAL_H
#define _LOCAL_H
#include <ev.h>
#include <libcork/ds.h>
#ifdef HAVE_LIBEV_EV_H
#include <libev/ev.h>
#else
#include <ev.h>
#endif
#include "crypto.h"
#include "jconf.h"
#include "protocol.h"
+6 -1
View File
@@ -23,10 +23,15 @@
#ifndef _MANAGER_H
#define _MANAGER_H
#include <ev.h>
#include <time.h>
#include <libcork/ds.h>
#ifdef HAVE_LIBEV_EV_H
#include <libev/ev.h>
#else
#include <ev.h>
#endif
#include "jconf.h"
#include "common.h"
+9 -5
View File
@@ -1,5 +1,4 @@
/*
* redir.h - Define the redirector's buffers and callbacks
/* * redir.h - Define the redirector's buffers and callbacks
*
* Copyright (C) 2013 - 2017, Max Lv <max.c.lv@gmail.com>
*
@@ -20,10 +19,15 @@
* <http://www.gnu.org/licenses/>.
*/
#ifndef _LOCAL_H
#define _LOCAL_H
#ifndef _REDIR_H
#define _REDIR_H
#ifdef HAVE_LIBEV_EV_H
#include <libev/ev.h>
#else
#include <ev.h>
#endif
#include "crypto.h"
#include "jconf.h"
@@ -75,4 +79,4 @@ typedef struct remote {
uint32_t counter;
} remote_t;
#endif // _LOCAL_H
#endif // _REDIR_H
+8 -2
View File
@@ -32,14 +32,20 @@
#include <stdlib.h>
#include <string.h>
#include <fcntl.h>
#include <ev.h>
#include <udns.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <errno.h>
#include <unistd.h>
#include <udns.h>
#ifdef HAVE_LIBEV_EV_H
#include <libev/ev.h>
#else
#include <ev.h>
#endif
#include "resolv.h"
#include "utils.h"
#include "netutils.h"
+6 -1
View File
@@ -23,10 +23,15 @@
#ifndef _SERVER_H
#define _SERVER_H
#include <ev.h>
#include <time.h>
#include <libcork/ds.h>
#ifdef HAVE_LIBEV_EV_H
#include <libev/ev.h>
#else
#include <ev.h>
#endif
#include "crypto.h"
#include "jconf.h"
#include "resolv.h"
+5
View File
@@ -23,7 +23,12 @@
#ifndef _TUNNEL_H
#define _TUNNEL_H
#ifdef HAVE_LIBEV_EV_H
#include <libev/ev.h>
#else
#include <ev.h>
#endif
#include "crypto.h"
#include "jconf.h"
+6 -1
View File
@@ -23,9 +23,14 @@
#ifndef _UDPRELAY_H
#define _UDPRELAY_H
#include <ev.h>
#include <time.h>
#ifdef HAVE_LIBEV_EV_H
#include <libev/ev.h>
#else
#include <ev.h>
#endif
#include "crypto.h"
#include "jconf.h"