Fredrik Fornwall
7 years ago
3 changed files with 42 additions and 36 deletions
@ -1,31 +0,0 @@ |
|||||
--- redir-2.2.1/Makefile 1999-12-26 12:51:55.000000000 -0800
|
|
||||
+++ src/Makefile 2017-02-15 13:07:10.577481896 -0800
|
|
||||
@@ -15,7 +15,8 @@
|
|
||||
# if your system needs any additional libraries (solaris, for example, |
|
||||
# needs the ones commented out below), edit this line. |
|
||||
|
|
||||
-EXTRA_LIBS = #-lnsl -lsocket
|
|
||||
+#EXTRA_LIBS = #-lnsl -lsocket
|
|
||||
+EXTRA_LIBS = -llog
|
|
||||
|
|
||||
# add additional compiler flags here. Some useful ones are: |
|
||||
# |
|
||||
@@ -27,7 +28,7 @@
|
|
||||
### end of user configuration section |
|
||||
|
|
||||
# redir requires gcc. if you're lucky, another compiler might work. |
|
||||
-CC = gcc
|
|
||||
+#CC = gcc
|
|
||||
|
|
||||
# if your system lacks getopt_long, remove the comment from this line |
|
||||
OBJS = redir.o $(GETOPT_OBJS) |
|
||||
@@ -51,6 +52,9 @@
|
|
||||
redir: ${OBJS} |
|
||||
${CC} ${LDFLAGS} -o redir ${OBJS} ${LIBS} |
|
||||
|
|
||||
+install: all
|
|
||||
+ install redir $(PREFIX)/bin
|
|
||||
+ install redir.man $(PREFIX)/share/man/man1/redir.1
|
|
||||
|
|
||||
|
|
||||
|
|
@ -1,7 +1,11 @@ |
|||||
TERMUX_PKG_HOMEPAGE=http://sammy.net/~sammy/hacks/ |
TERMUX_PKG_HOMEPAGE=https://github.com/troglobit/redir |
||||
TERMUX_PKG_DESCRIPTION="Redirect TCP connections" |
TERMUX_PKG_DESCRIPTION="TCP port redirector for UNIX" |
||||
TERMUX_PKG_VERSION=2.2.1 |
TERMUX_PKG_VERSION=3.2 |
||||
TERMUX_PKG_SRCURL=http://sammy.net/~sammy/hacks/redir-2.2.1.tar.gz |
TERMUX_PKG_SHA256=e3c61bc4a51cf9228f916aeee3cb510bdff29ec2cdc2a1c8ae43d597bec89baa |
||||
TERMUX_PKG_SHA256=7ea504f835338e448f674ca8637512f511bf74538418ad43ab39039017090e6c |
TERMUX_PKG_SRCURL=https://github.com/troglobit/redir/releases/download/v$TERMUX_PKG_VERSION/redir-$TERMUX_PKG_VERSION.tar.xz |
||||
TERMUX_PKG_BUILD_IN_SRC="yes" |
TERMUX_PKG_BUILD_IN_SRC="yes" |
||||
TERMUX_PKG_RM_AFTER_INSTALL="share/applications share/pixmaps" |
TERMUX_PKG_RM_AFTER_INSTALL="share/applications share/pixmaps" |
||||
|
|
||||
|
termux_step_pre_configure() { |
||||
|
LDFLAGS+=" -llog" |
||||
|
} |
||||
|
@ -0,0 +1,33 @@ |
|||||
|
diff -u -r ../redir-3.2/redir.c ./redir.c
|
||||
|
--- ../redir-3.2/redir.c 2018-03-10 12:21:06.000000000 +0100
|
||||
|
+++ ./redir.c 2018-06-26 05:34:44.517378133 +0200
|
||||
|
@@ -184,6 +184,29 @@
|
||||
|
return code; |
||||
|
} |
||||
|
|
||||
|
+#ifdef __ANDROID__
|
||||
|
+typedef struct _code {
|
||||
|
+ char *c_name;
|
||||
|
+ int c_val;
|
||||
|
+} CODE;
|
||||
|
+
|
||||
|
+CODE prioritynames[] =
|
||||
|
+ {
|
||||
|
+ { "alert", LOG_ALERT },
|
||||
|
+ { "crit", LOG_CRIT },
|
||||
|
+ { "debug", LOG_DEBUG },
|
||||
|
+ { "emerg", LOG_EMERG },
|
||||
|
+ { "err", LOG_ERR },
|
||||
|
+ { "error", LOG_ERR },
|
||||
|
+ { "info", LOG_INFO },
|
||||
|
+ { "notice", LOG_NOTICE },
|
||||
|
+ { "panic", LOG_EMERG },
|
||||
|
+ { "warn", LOG_WARNING },
|
||||
|
+ { "warning", LOG_WARNING },
|
||||
|
+ { NULL, -1 }
|
||||
|
+ };
|
||||
|
+#endif
|
||||
|
+
|
||||
|
static int loglvl(char *level) |
||||
|
{ |
||||
|
int i; |
Loading…
Reference in new issue