aterm: fix 'bad system call' error

Attempt to fix https://github.com/termux/x11-packages/issues/19.
This commit is contained in:
Leonid Pliushch 2018-11-07 22:37:56 +02:00 committed by Yaksh Bariya
parent 1411e0b341
commit 3f991fac21
No known key found for this signature in database
GPG Key ID: F7486BA7D3D27581
4 changed files with 53 additions and 6 deletions

View File

@ -1,6 +1,6 @@
diff -uNr aterm-1.0.1/autoconf/Make.common.in aterm-1.0.1.mod/autoconf/Make.common.in diff -uNr aterm-1.0.1/autoconf/Make.common.in aterm-1.0.1.mod/autoconf/Make.common.in
--- aterm-1.0.1/autoconf/Make.common.in 2005-05-26 19:44:49.000000000 +0300 --- aterm-1.0.1/autoconf/Make.common.in 2005-05-26 19:44:49.000000000 +0300
+++ aterm-1.0.1.mod/autoconf/Make.common.in 2018-06-15 22:45:03.335372785 +0300 +++ aterm-1.0.1.mod/autoconf/Make.common.in 2018-11-07 22:33:22.089407176 +0200
@@ -41,7 +41,7 @@ @@ -41,7 +41,7 @@
CP = @CP@ CP = @CP@
SED = @SED@ SED = @SED@

View File

@ -1,7 +1,54 @@
diff -uNr aterm-1.0.1/src/command.c aterm-1.0.1.mod/src/command.c diff -uNr aterm-1.0.1/src/command.c aterm-1.0.1.mod/src/command.c
--- aterm-1.0.1/src/command.c 2006-06-26 21:01:20.000000000 +0300 --- aterm-1.0.1/src/command.c 2006-06-26 21:01:20.000000000 +0300
+++ aterm-1.0.1.mod/src/command.c 2018-06-15 22:58:36.195350239 +0300 +++ aterm-1.0.1.mod/src/command.c 2018-11-07 22:34:07.676283610 +0200
@@ -552,20 +552,10 @@ @@ -425,45 +425,7 @@
void
privileges(int mode)
{
-#ifdef HAVE_SETEUID
- static uid_t euid;
- static gid_t egid;
-
- switch (mode) {
- case IGNORE:
- /*
- * change effective uid/gid - not real uid/gid - so we can switch
- * back to root later, as required
- */
- seteuid(getuid());
- setegid(getgid());
- break;
-
- case SAVE:
- euid = geteuid();
- egid = getegid();
- break;
-
- case RESTORE:
- seteuid(euid);
- setegid(egid);
- break;
- }
-#else
-# ifndef __CYGWIN32__
- switch (mode) {
- case IGNORE:
- setuid(getuid());
- setgid(getgid());
- break;
-
- case SAVE:
- break;
- case RESTORE:
- break;
- }
-# endif
-#endif
+// do nothing on Termux.
}
/*}}} */
@@ -552,20 +514,10 @@
{ {
int fd = -1; int fd = -1;
@ -22,7 +69,7 @@ diff -uNr aterm-1.0.1/src/command.c aterm-1.0.1.mod/src/command.c
goto Failed; goto Failed;
} else { } else {
grantpt(fd); /* change slave permissions */ grantpt(fd); /* change slave permissions */
@@ -573,61 +563,6 @@ @@ -573,61 +525,6 @@
ptydev = ttydev = ptsname(fd); /* get slave's name */ ptydev = ttydev = ptsname(fd); /* get slave's name */
goto Found; goto Found;
} }

View File

@ -1,6 +1,6 @@
diff -uNr aterm-1.0.1/src/rxvt.h aterm-1.0.1.mod/src/rxvt.h diff -uNr aterm-1.0.1/src/rxvt.h aterm-1.0.1.mod/src/rxvt.h
--- aterm-1.0.1/src/rxvt.h 2006-02-17 23:35:37.000000000 +0200 --- aterm-1.0.1/src/rxvt.h 2006-02-17 23:35:37.000000000 +0200
+++ aterm-1.0.1.mod/src/rxvt.h 2018-06-15 22:51:02.295362829 +0300 +++ aterm-1.0.1.mod/src/rxvt.h 2018-11-07 22:33:22.099407222 +0200
@@ -564,7 +564,7 @@ @@ -564,7 +564,7 @@
# define OLD_WORD_SELECTION # define OLD_WORD_SELECTION
#endif #endif

View File

@ -3,7 +3,7 @@ TERMUX_PKG_MAINTAINER="Leonid Plyushch <leonid.plyushch@gmail.com> @xeffyr"
TERMUX_PKG_HOMEPAGE=http://aterm.sourceforge.net/ TERMUX_PKG_HOMEPAGE=http://aterm.sourceforge.net/
TERMUX_PKG_DESCRIPTION="An xterm replacement with transparency support" TERMUX_PKG_DESCRIPTION="An xterm replacement with transparency support"
TERMUX_PKG_VERSION=1.0.1 TERMUX_PKG_VERSION=1.0.1
TERMUX_PKG_REVISION=5 TERMUX_PKG_REVISION=6
TERMUX_PKG_SRCURL=http://downloads.sourceforge.net/sourceforge/aterm/aterm-${TERMUX_PKG_VERSION}.tar.bz2 TERMUX_PKG_SRCURL=http://downloads.sourceforge.net/sourceforge/aterm/aterm-${TERMUX_PKG_VERSION}.tar.bz2
TERMUX_PKG_SHA256=a161c3b2d9c7149130a41963899993af21eae92e8e362f4b5b3c7c4cb16760ce TERMUX_PKG_SHA256=a161c3b2d9c7149130a41963899993af21eae92e8e362f4b5b3c7c4cb16760ce
TERMUX_PKG_DEPENDS="libice, libsm, libx11, libxext" TERMUX_PKG_DEPENDS="libice, libsm, libx11, libxext"