Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
com.ccwangluo.accelerator
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
sheteng
com.ccwangluo.accelerator
Commits
a3519fbd
Commit
a3519fbd
authored
Nov 19, 2014
by
Max Lv
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
enable aarch64 and x86_64 build
parent
486288a5
Changes
10
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
41 additions
and
26 deletions
+41
-26
src/main/jni/Android.mk
src/main/jni/Android.mk
+7
-7
src/main/jni/Application.mk
src/main/jni/Application.mk
+1
-1
src/main/jni/libevent/arc4random.c
src/main/jni/libevent/arc4random.c
+2
-0
src/main/jni/libevent/epoll_sub.c
src/main/jni/libevent/epoll_sub.c
+15
-2
src/main/jni/libevent/include/event2/event-config.h
src/main/jni/libevent/include/event2/event-config.h
+5
-3
src/main/jni/openssl/android-config.mk
src/main/jni/openssl/android-config.mk
+1
-1
src/main/jni/pdnsd/config.h
src/main/jni/pdnsd/config.h
+6
-2
src/main/jni/pdnsd/src/ipvers.h
src/main/jni/pdnsd/src/ipvers.h
+2
-0
src/main/scala/com/github/shadowsocks/Shadowsocks.scala
src/main/scala/com/github/shadowsocks/Shadowsocks.scala
+0
-8
src/main/scala/com/github/shadowsocks/utils/Utils.scala
src/main/scala/com/github/shadowsocks/utils/Utils.scala
+2
-2
No files found.
src/main/jni/Android.mk
View file @
a3519fbd
...
@@ -304,13 +304,13 @@ openssl_subdirs := $(addprefix $(LOCAL_PATH)/openssl/,$(addsuffix /Android.mk, \
...
@@ -304,13 +304,13 @@ openssl_subdirs := $(addprefix $(LOCAL_PATH)/openssl/,$(addsuffix /Android.mk, \
include
$(openssl_subdirs)
include
$(openssl_subdirs)
# Iptables
# Iptables
LOCAL_PATH
:=
$(ROOT_PATH)
#
LOCAL_PATH := $(ROOT_PATH)
iptables_subdirs
:=
$(
addprefix
$(LOCAL_PATH)
/iptables/,
$(
addsuffix
/Android.mk,
\
#
iptables_subdirs := $(addprefix $(LOCAL_PATH)/iptables/,$(addsuffix /Android.mk, \
iptables
\
#
iptables \
extensions
\
#
extensions \
libiptc
\
#
libiptc \
))
#
))
include
$(iptables_subdirs)
#
include $(iptables_subdirs)
# Import cpufeatures
# Import cpufeatures
$(call
import-module,android/cpufeatures)
$(call
import-module,android/cpufeatures)
src/main/jni/Application.mk
View file @
a3519fbd
APP_ABI
:=
armeabi-v7a
x86
APP_ABI
:=
armeabi-v7a
arm64-v8a x86 x86_64
APP_PLATFORM
:=
android-16
APP_PLATFORM
:=
android-16
APP_STL
:=
stlport_static
APP_STL
:=
stlport_static
NDK_TOOLCHAIN_VERSION
:=
4.9
NDK_TOOLCHAIN_VERSION
:=
4.9
src/main/jni/libevent/arc4random.c
View file @
a3519fbd
...
@@ -477,6 +477,7 @@ arc4random(void)
...
@@ -477,6 +477,7 @@ arc4random(void)
}
}
#endif
#endif
#ifndef _EVENT_HAVE_ARC4RANDOM_BUF
ARC4RANDOM_EXPORT
void
ARC4RANDOM_EXPORT
void
arc4random_buf
(
void
*
_buf
,
size_t
n
)
arc4random_buf
(
void
*
_buf
,
size_t
n
)
{
{
...
@@ -490,6 +491,7 @@ arc4random_buf(void *_buf, size_t n)
...
@@ -490,6 +491,7 @@ arc4random_buf(void *_buf, size_t n)
}
}
_ARC4_UNLOCK
();
_ARC4_UNLOCK
();
}
}
#endif
#ifndef ARC4RANDOM_NOUNIFORM
#ifndef ARC4RANDOM_NOUNIFORM
/*
/*
...
...
src/main/jni/libevent/epoll_sub.c
View file @
a3519fbd
...
@@ -31,11 +31,20 @@
...
@@ -31,11 +31,20 @@
#include <sys/syscall.h>
#include <sys/syscall.h>
#include <sys/epoll.h>
#include <sys/epoll.h>
#include <unistd.h>
#include <unistd.h>
#include <errno.h>
int
int
epoll_create
(
int
size
)
epoll_create
(
int
size
)
{
{
return
(
syscall
(
__NR_epoll_create
,
size
));
#if !defined(__NR_epoll_create) && defined(__NR_epoll_create1)
if
(
size
<=
0
)
{
errno
=
EINVAL
;
return
-
1
;
}
return
(
syscall
(
__NR_epoll_create1
,
0
));
#else
return
(
syscall
(
__NR_epoll_create
,
size
));
#endif
}
}
int
int
...
@@ -48,5 +57,9 @@ epoll_ctl(int epfd, int op, int fd, struct epoll_event *event)
...
@@ -48,5 +57,9 @@ epoll_ctl(int epfd, int op, int fd, struct epoll_event *event)
int
int
epoll_wait
(
int
epfd
,
struct
epoll_event
*
events
,
int
maxevents
,
int
timeout
)
epoll_wait
(
int
epfd
,
struct
epoll_event
*
events
,
int
maxevents
,
int
timeout
)
{
{
return
(
syscall
(
__NR_epoll_wait
,
epfd
,
events
,
maxevents
,
timeout
));
#if !defined(__NR_epoll_wait) && defined(__NR_epoll_pwait)
return
(
syscall
(
__NR_epoll_pwait
,
epfd
,
events
,
maxevents
,
timeout
,
NULL
,
0
));
#else
return
(
syscall
(
__NR_epoll_wait
,
epfd
,
events
,
maxevents
,
timeout
));
#endif
}
}
src/main/jni/libevent/include/event2/event-config.h
View file @
a3519fbd
...
@@ -24,10 +24,12 @@
...
@@ -24,10 +24,12 @@
/* #undef _EVENT_DISABLE_THREAD_SUPPORT */
/* #undef _EVENT_DISABLE_THREAD_SUPPORT */
/* Define to 1 if you have the `arc4random' function. */
/* Define to 1 if you have the `arc4random' function. */
#if !defined(__aarch64__) && !defined(__x86_64__)
#define _EVENT_HAVE_ARC4RANDOM 1
#define _EVENT_HAVE_ARC4RANDOM 1
#endif
/* Define to 1 if you have the `arc4random_buf' function. */
/* Define to 1 if you have the `arc4random_buf' function. */
/* #undef _EVENT_HAVE_ARC4RANDOM_BUF */
#define _EVENT_HAVE_ARC4RANDOM_BUF
/* Define to 1 if you have the <arpa/inet.h> header file. */
/* Define to 1 if you have the <arpa/inet.h> header file. */
#define _EVENT_HAVE_ARPA_INET_H 1
#define _EVENT_HAVE_ARPA_INET_H 1
...
@@ -262,7 +264,7 @@
...
@@ -262,7 +264,7 @@
/* #undef _EVENT_HAVE_STRUCT_SOCKADDR_STORAGE___SS_FAMILY */
/* #undef _EVENT_HAVE_STRUCT_SOCKADDR_STORAGE___SS_FAMILY */
/* Define to 1 if you have the `sysctl' function. */
/* Define to 1 if you have the `sysctl' function. */
#define _EVENT_HAVE_SYSCTL 1
//
#define _EVENT_HAVE_SYSCTL 1
/* Define to 1 if you have the <sys/devpoll.h> header file. */
/* Define to 1 if you have the <sys/devpoll.h> header file. */
/* #undef _EVENT_HAVE_SYS_DEVPOLL_H */
/* #undef _EVENT_HAVE_SYS_DEVPOLL_H */
...
@@ -301,7 +303,7 @@
...
@@ -301,7 +303,7 @@
#define _EVENT_HAVE_SYS_STAT_H 1
#define _EVENT_HAVE_SYS_STAT_H 1
/* Define to 1 if you have the <sys/sysctl.h> header file. */
/* Define to 1 if you have the <sys/sysctl.h> header file. */
#define _EVENT_HAVE_SYS_SYSCTL_H 1
//
#define _EVENT_HAVE_SYS_SYSCTL_H 1
/* Define to 1 if you have the <sys/time.h> header file. */
/* Define to 1 if you have the <sys/time.h> header file. */
#define _EVENT_HAVE_SYS_TIME_H 1
#define _EVENT_HAVE_SYS_TIME_H 1
...
...
src/main/jni/openssl/android-config.mk
View file @
a3519fbd
...
@@ -15,7 +15,7 @@ LOCAL_CFLAGS += -DOPENSSL_NO_EC_NISTP_64_GCC_128 -DOPENSSL_NO_SCTP \
...
@@ -15,7 +15,7 @@ LOCAL_CFLAGS += -DOPENSSL_NO_EC_NISTP_64_GCC_128 -DOPENSSL_NO_SCTP \
# LOCAL_CFLAGS += -DOPENSSL_NO_DEPRECATED
# LOCAL_CFLAGS += -DOPENSSL_NO_DEPRECATED
# Extra
# Extra
LOCAL_CFLAGS
+=
-DOPENSSL_NO_HW
-DOPENSSL_NO_ENGINE
-DZLIB
LOCAL_CFLAGS
+=
-DOPENSSL_NO_HW
-DOPENSSL_NO_
ASM
-DOPENSSL_NO_
ENGINE
-DZLIB
# Debug
# Debug
# LOCAL_CFLAGS += -DCIPHER_DEBUG
# LOCAL_CFLAGS += -DCIPHER_DEBUG
src/main/jni/pdnsd/config.h
View file @
a3519fbd
...
@@ -219,7 +219,9 @@
...
@@ -219,7 +219,9 @@
#define HAVE_FCNTL_H 1
#define HAVE_FCNTL_H 1
/* Define to 1 if you have the `getline' function. */
/* Define to 1 if you have the `getline' function. */
//#define HAVE_GETLINE 1
#if defined(__aarch64__) || defined(__x86_64__)
#define HAVE_GETLINE 1
#endif
/* Define to 1 if you have the `getpwnam_r' function. */
/* Define to 1 if you have the `getpwnam_r' function. */
//#define HAVE_GETPWNAM_R 1
//#define HAVE_GETPWNAM_R 1
...
@@ -282,7 +284,9 @@
...
@@ -282,7 +284,9 @@
#define HAVE_STDLIB_H 1
#define HAVE_STDLIB_H 1
/* Define to 1 if you have the `stpcpy' function. */
/* Define to 1 if you have the `stpcpy' function. */
//#define HAVE_STPCPY 1
#if defined(__aarch64__) || defined(__x86_64__)
#define HAVE_STPCPY 1
#endif
/* Define to 1 if you have the `stpncpy' function. */
/* Define to 1 if you have the `stpncpy' function. */
//#define HAVE_STPNCPY 1
//#define HAVE_STPNCPY 1
...
...
src/main/jni/pdnsd/src/ipvers.h
View file @
a3519fbd
...
@@ -151,7 +151,9 @@ __cmsg_nxthdr (struct msghdr *__mhdr, struct cmsghdr *__cmsg) __THROW
...
@@ -151,7 +151,9 @@ __cmsg_nxthdr (struct msghdr *__mhdr, struct cmsghdr *__cmsg) __THROW
/* This is the IPv6 flowid that we pass on to the IPv6 protocol stack. This value was not currently defined
/* This is the IPv6 flowid that we pass on to the IPv6 protocol stack. This value was not currently defined
* at the time of writing. Should this change, define a appropriate flowinfo here. */
* at the time of writing. Should this change, define a appropriate flowinfo here. */
#ifndef IPV6_FLOWINFO
#define IPV6_FLOWINFO 0
#define IPV6_FLOWINFO 0
#endif
/* There does not seem to be a function/macro to generate IPv6-mapped IPv4-Adresses. So here comes mine.
/* There does not seem to be a function/macro to generate IPv6-mapped IPv4-Adresses. So here comes mine.
* Pass an in_addr* and an in6_addr* */
* Pass an in_addr* and an in6_addr* */
...
...
src/main/scala/com/github/shadowsocks/Shadowsocks.scala
View file @
a3519fbd
...
@@ -830,14 +830,6 @@ class Shadowsocks
...
@@ -830,14 +830,6 @@ class Shadowsocks
crash_recovery
()
crash_recovery
()
copyAssets
(
System
.
getABI
)
val
ab
=
new
ArrayBuffer
[
String
]
for
(
executable
<-
Shadowsocks
.
EXECUTABLES
)
{
ab
.
append
(
"chmod 755 "
+
Path
.
BASE
+
executable
)
}
Console
.
runCommand
(
ab
.
toArray
)
}
}
private
def
recovery
()
{
private
def
recovery
()
{
...
...
src/main/scala/com/github/shadowsocks/utils/Utils.scala
View file @
a3519fbd
...
@@ -68,8 +68,8 @@ object Utils {
...
@@ -68,8 +68,8 @@ object Utils {
val
DEFAULT_SHELL
:
String
=
"/system/bin/sh"
val
DEFAULT_SHELL
:
String
=
"/system/bin/sh"
val
DEFAULT_ROOT
:
String
=
"/system/bin/su"
val
DEFAULT_ROOT
:
String
=
"/system/bin/su"
val
ALTERNATIVE_ROOT
:
String
=
"/system/xbin/su"
val
ALTERNATIVE_ROOT
:
String
=
"/system/xbin/su"
val
DEFAULT_IPTABLES
:
String
=
"/
data/data/com.github.shadowsocks
/iptables"
val
DEFAULT_IPTABLES
:
String
=
"/
system/bin
/iptables"
val
ALTERNATIVE_IPTABLES
:
String
=
"/
system/bin
/iptables"
val
ALTERNATIVE_IPTABLES
:
String
=
"/
data/data/com.github.shadowsocks
/iptables"
val
TIME_OUT
:
Int
=
-
99
val
TIME_OUT
:
Int
=
-
99
var
initialized
:
Boolean
=
false
var
initialized
:
Boolean
=
false
var
hasRedirectSupport
:
Int
=
-
1
var
hasRedirectSupport
:
Int
=
-
1
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment