Browse Source

psmisc: Patch away usage of mempcpy

android-5
Fredrik Fornwall 8 years ago
parent
commit
88d640c215
  1. 7
      packages/psmisc/build.sh
  2. 12
      packages/psmisc/src-fuser.c.patch

7
packages/psmisc/build.sh

@ -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"
}

12
packages/psmisc/src-fuser.c.patch

@ -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) {
Loading…
Cancel
Save