Fredrik Fornwall
8 years ago
4 changed files with 59 additions and 0 deletions
@ -0,0 +1,12 @@ |
|||||
|
TERMUX_PKG_HOMEPAGE=https://github.com/dgoulet/torsocks |
||||
|
TERMUX_PKG_DESCRIPTION="Wrapper to safely torify applications" |
||||
|
TERMUX_PKG_VERSION=2.2.0 |
||||
|
TERMUX_PKG_SRCURL=https://github.com/dgoulet/torsocks/archive/v${TERMUX_PKG_VERSION}.tar.gz |
||||
|
TERMUX_PKG_DEPENDS="tor" |
||||
|
TERMUX_PKG_FOLDERNAME=torsocks-$TERMUX_PKG_VERSION |
||||
|
|
||||
|
termux_step_pre_configure () { |
||||
|
cd $TERMUX_PKG_SRCDIR |
||||
|
./autogen.sh |
||||
|
} |
||||
|
|
@ -0,0 +1,14 @@ |
|||||
|
diff -u -r ../torsocks-2.2.0/src/common/config-file.h ./src/common/config-file.h
|
||||
|
--- ../torsocks-2.2.0/src/common/config-file.h 2016-10-18 12:44:01.000000000 -0400
|
||||
|
+++ ./src/common/config-file.h 2016-12-20 21:18:35.084929826 -0500
|
||||
|
@@ -21,6 +21,10 @@
|
||||
|
#define CONFIG_FILE_H |
||||
|
|
||||
|
#include <netinet/in.h> |
||||
|
+#ifdef __ANDROID__
|
||||
|
+/* For in_addr_t. */
|
||||
|
+#include <arpa/inet.h>
|
||||
|
+#endif
|
||||
|
|
||||
|
#include "connection.h" |
||||
|
#include "socks5.h" |
@ -0,0 +1,21 @@ |
|||||
|
diff -u -r ../torsocks-2.2.0/src/lib/torsocks.h ./src/lib/torsocks.h
|
||||
|
--- ../torsocks-2.2.0/src/lib/torsocks.h 2016-10-18 12:44:01.000000000 -0400
|
||||
|
+++ ./src/lib/torsocks.h 2016-12-20 21:22:07.973637763 -0500
|
||||
|
@@ -167,7 +167,7 @@
|
||||
|
#define LIBC_GETHOSTBYADDR_R_NAME gethostbyaddr_r |
||||
|
#define LIBC_GETHOSTBYADDR_R_NAME_STR XSTR(LIBC_GETHOSTBYADDR_R_NAME) |
||||
|
#define LIBC_GETHOSTBYADDR_R_RET_TYPE int |
||||
|
-#define LIBC_GETHOSTBYADDR_R_SIG const void *addr, socklen_t len, int type, \
|
||||
|
+#define LIBC_GETHOSTBYADDR_R_SIG const void *addr, int len, int type, \
|
||||
|
struct hostent *hret, char *buf, size_t buflen, \ |
||||
|
struct hostent **result, int *h_errnop |
||||
|
#define LIBC_GETHOSTBYADDR_R_ARGS addr, len, type, hret, buf, \ |
||||
|
@@ -197,7 +197,7 @@
|
||||
|
/* recvmsg(2) */ |
||||
|
#define LIBC_RECVMSG_NAME recvmsg |
||||
|
#define LIBC_RECVMSG_NAME_STR XSTR(LIBC_RECVMSG_NAME) |
||||
|
-#define LIBC_RECVMSG_RET_TYPE ssize_t
|
||||
|
+#define LIBC_RECVMSG_RET_TYPE int
|
||||
|
#define LIBC_RECVMSG_SIG \ |
||||
|
int sockfd, struct msghdr *msg, int flags |
||||
|
#define LIBC_RECVMSG_ARGS \ |
@ -0,0 +1,12 @@ |
|||||
|
diff -u -r ../torsocks-2.2.0/tests/Makefile.am ./tests/Makefile.am
|
||||
|
--- ../torsocks-2.2.0/tests/Makefile.am 2016-10-18 12:44:01.000000000 -0400
|
||||
|
+++ ./tests/Makefile.am 2016-12-20 21:23:41.960184652 -0500
|
||||
|
@@ -29,7 +29,7 @@
|
||||
|
test_connect_LDADD = $(LIBTAP) $(LIBTORSOCKS) |
||||
|
|
||||
|
test_fd_passing_SOURCES = test_fd_passing.c |
||||
|
-test_fd_passing_LDADD = $(LIBTAP) $(LIBTORSOCKS) -lpthread
|
||||
|
+test_fd_passing_LDADD = $(LIBTAP) $(LIBTORSOCKS)
|
||||
|
|
||||
|
test_getpeername_SOURCES = test_getpeername.c |
||||
|
test_getpeername_LDADD = $(LIBTAP) $(LIBTORSOCKS) |
Loading…
Reference in new issue