mirror of
https://github.com/termux-pacman/termux-packages.git
synced 2026-02-10 11:50:52 +00:00
fix(main/zssh): fix build by applying patches from Arch Linux
- Patches copied and pasted from c0eba9c489/
This commit is contained in:
@@ -3,7 +3,7 @@ TERMUX_PKG_DESCRIPTION="A program for interactively transferring files to a remo
|
||||
TERMUX_PKG_LICENSE="GPL-2.0"
|
||||
TERMUX_PKG_MAINTAINER="@termux"
|
||||
TERMUX_PKG_VERSION=1.5c
|
||||
TERMUX_PKG_REVISION=1
|
||||
TERMUX_PKG_REVISION=2
|
||||
TERMUX_PKG_SRCURL=https://downloads.sourceforge.net/zssh/zssh-${TERMUX_PKG_VERSION}.tgz
|
||||
TERMUX_PKG_SHA256=a2e840f82590690d27ea1ea1141af509ee34681fede897e58ae8d354701ce71b
|
||||
TERMUX_PKG_DEPENDS="libandroid-glob, lrzsz, openssh, readline"
|
||||
|
||||
@@ -0,0 +1,53 @@
|
||||
From: Ben Wong <ben@wongs.net>
|
||||
Date: Tue, 25 Sep 2007 01:48:30 -0700
|
||||
Subject: Use GNU openpty library for pty.h
|
||||
|
||||
---
|
||||
configure.in | 11 +++++++++--
|
||||
openpty.c | 4 ++++
|
||||
2 files changed, 13 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/configure.in b/configure.in
|
||||
index a8f1441..af2cad0 100644
|
||||
--- a/configure.in
|
||||
+++ b/configure.in
|
||||
@@ -57,7 +57,7 @@ AC_CONFIG_HEADER(config.h)
|
||||
AC_HEADER_STDC
|
||||
AC_HEADER_SYS_WAIT
|
||||
AC_CHECK_HEADERS(fcntl.h paths.h sys/ioctl.h sys/time.h termios.h unistd.h \
|
||||
- err.h sys/cdefs.h sys/param.h util.h stropts.h)
|
||||
+ err.h sys/cdefs.h sys/param.h util.h stropts.h pty.h)
|
||||
|
||||
|
||||
|
||||
@@ -97,7 +97,14 @@ AC_CHECK_FUNCS(strdup getpt isastream tcsetpgrp)
|
||||
|
||||
|
||||
dnl Check what is available for tty/pty allocation
|
||||
-AC_CHECK_FUNCS(_getpty getpseudotty openpty grantpt unlockpt)
|
||||
+AC_CHECK_FUNCS(_getpty getpseudotty grantpt unlockpt)
|
||||
+AC_CHECK_FUNCS(openpty,,
|
||||
+ [AC_CHECK_LIB(util,openpty,
|
||||
+ [AC_DEFINE(HAVE_OPENPTY)
|
||||
+ LIBS="$LIBS -lutil"]
|
||||
+ )])
|
||||
+
|
||||
+
|
||||
AC_MSG_CHECKING(for pseudo ttys)
|
||||
if test -c /dev/getpty && test $ac_cv_func_getpseudotty = yes
|
||||
then
|
||||
diff --git a/openpty.c b/openpty.c
|
||||
index 42cb203..0b8a642 100644
|
||||
--- a/openpty.c
|
||||
+++ b/openpty.c
|
||||
@@ -25,6 +25,10 @@ static char gl_slavename[GL_SLAVENAMELEN + 1] = {0};
|
||||
#include <util.h>
|
||||
#endif
|
||||
|
||||
+#ifdef HAVE_PTY_H
|
||||
+#include <pty.h>
|
||||
+#endif
|
||||
+
|
||||
void getmaster()
|
||||
{
|
||||
#ifdef DEBUG
|
||||
22
packages/zssh/zssh-1.5c-c99.patch
Normal file
22
packages/zssh/zssh-1.5c-c99.patch
Normal file
@@ -0,0 +1,22 @@
|
||||
Add missing entry for HAVE_PTY_H in config.h. Without it, the
|
||||
generated config.h will not define HAVE_PTY_H, and <pty.h> is not
|
||||
included in openpty.c. This leads to an implicit declaration of the
|
||||
openpty function, causing a C99 compatibility problem.
|
||||
|
||||
This should go away on its own if upstream ever does a new upstream
|
||||
release, as config.h.in is usually generated by autoheader.
|
||||
|
||||
diff --git a/config.h.in b/config.h.in
|
||||
index 2d863e29d64848bf..c2e0cc979dc0fa56 100644
|
||||
--- a/config.h.in
|
||||
+++ b/config.h.in
|
||||
@@ -79,6 +79,9 @@
|
||||
/* Define if you have the <paths.h> header file. */
|
||||
#undef HAVE_PATHS_H
|
||||
|
||||
+/* Define if you have the <pty.h> header file. */
|
||||
+#undef HAVE_PTY_H
|
||||
+
|
||||
/* Define if you have the <readline/history.h> header file. */
|
||||
#undef HAVE_READLINE_HISTORY_H
|
||||
|
||||
@@ -0,0 +1,22 @@
|
||||
From: YuanQing Su <syq@debian.org>
|
||||
Date: Mon, 21 Jul 2014 08:22:29 +0000
|
||||
Subject: replace CPPFunction call with rl_completion_func_t
|
||||
|
||||
This closes #741761.
|
||||
---
|
||||
completion.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/completion.c b/completion.c
|
||||
index 98e714a..de44329 100644
|
||||
--- a/completion.c
|
||||
+++ b/completion.c
|
||||
@@ -53,7 +53,7 @@ void initialize_readline()
|
||||
so that if zssh_completion() fails nothing is completed */
|
||||
rl_completion_entry_function = fake_generator;
|
||||
/* Tell the completer that we want a crack first. */
|
||||
- rl_attempted_completion_function = (CPPFunction *) zssh_completion;
|
||||
+ rl_attempted_completion_function = (rl_completion_func_t *) zssh_completion;
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user