psmisc: Patch away usage of mempcpy

This commit is contained in:
Fredrik Fornwall 2017-03-06 00:01:56 +01:00
parent 11f23d1ccd
commit 88d640c215
2 changed files with 14 additions and 5 deletions

View File

@ -1,10 +1,7 @@
TERMUX_PKG_HOMEPAGE=http://psmisc.sourceforge.net/
TERMUX_PKG_HOMEPAGE=https://gitlab.com/psmisc/psmisc
TERMUX_PKG_DESCRIPTION="Some small useful utilities that use the proc filesystem"
TERMUX_PKG_DEPENDS="ncurses"
TERMUX_PKG_VERSION=22.21
TERMUX_PKG_SRCURL=http://downloads.sourceforge.net/project/psmisc/psmisc/psmisc-${TERMUX_PKG_VERSION}.tar.gz
TERMUX_PKG_SHA256=97323cad619210845b696d7d722c383852b2acb5c49b5b0852c4f29c77a8145a
TERMUX_PKG_RM_AFTER_INSTALL="bin/pstree.x11"
termux_step_pre_configure() {
CFLAGS+=" -DTERMUX_EXPOSE_MEMPCPY=1"
}

View File

@ -0,0 +1,12 @@
diff -u -r ../psmisc-22.21/src/fuser.c ./src/fuser.c
--- ../psmisc-22.21/src/fuser.c 2014-01-31 14:07:32.000000000 +0100
+++ ./src/fuser.c 2017-03-05 23:50:01.776063577 +0100
@@ -2085,7 +2085,7 @@
return (char *)0;
}
- dest = mempcpy(dest, start, end - start);
+ dest = ((char*) memcpy(dest, start, end - start)) + (end - start);
*dest = '\0';
if (deep-- < 0) {