diff --git a/packages/apt/cmndline-no-strchrnul.patch b/packages/apt/cmndline-no-strchrnul.patch deleted file mode 100644 index 55a08727f..000000000 --- a/packages/apt/cmndline-no-strchrnul.patch +++ /dev/null @@ -1,18 +0,0 @@ -diff -u -r ../apt-0.9.16.1/apt-pkg/contrib/cmndline.cc ./apt-pkg/contrib/cmndline.cc ---- ../apt-0.9.16.1/apt-pkg/contrib/cmndline.cc 2014-03-15 17:23:45.000000000 +0100 -+++ ./apt-pkg/contrib/cmndline.cc 2014-03-25 01:10:30.764711007 +0100 -@@ -27,6 +27,14 @@ - /*}}}*/ - using namespace std; - -+#if defined(__ANDROID__) -+static char* strchrnul(char const* s, int c) -+{ -+ char const* result = strchr(s, c); -+ return const_cast((result == NULL) ? (s + strlen(s)) : result); -+} -+#endif -+ - // CommandLine::CommandLine - Constructor /*{{{*/ - // --------------------------------------------------------------------- - /* */ diff --git a/packages/apt/debsrcrecords.patch b/packages/apt/debsrcrecords.patch deleted file mode 100644 index bedcbc096..000000000 --- a/packages/apt/debsrcrecords.patch +++ /dev/null @@ -1,18 +0,0 @@ -diff -u -r ../apt-0.9.16.1/apt-pkg/deb/debsrcrecords.cc ./apt-pkg/deb/debsrcrecords.cc ---- ../apt-0.9.16.1/apt-pkg/deb/debsrcrecords.cc 2014-03-15 17:23:45.000000000 +0100 -+++ ./apt-pkg/deb/debsrcrecords.cc 2014-03-25 01:23:30.652689687 +0100 -@@ -26,6 +26,14 @@ - #include - #include - /*}}}*/ -+#if defined(__ANDROID__) -+static char* strchrnul(char const* s, int c) -+{ -+ char const* result = strchr(s, c); -+ return const_cast((result == NULL) ? (s + strlen(s)) : result); -+} -+#endif -+ - - using std::max; - using std::string; diff --git a/packages/busybox/include-platform.h.patch b/packages/busybox/include-platform.h.patch new file mode 100644 index 000000000..c44f20025 --- /dev/null +++ b/packages/busybox/include-platform.h.patch @@ -0,0 +1,14 @@ +diff -uNr busybox-1.29.3/include/platform.h busybox-1.29.3.mod/include/platform.h +--- busybox-1.29.3/include/platform.h 2018-07-02 14:23:06.000000000 +0300 ++++ busybox-1.29.3.mod/include/platform.h 2019-02-08 16:01:14.437858554 +0200 +@@ -579,10 +579,6 @@ + extern char *strcasestr(const char *s, const char *pattern) FAST_FUNC; + #endif + +-#ifndef HAVE_STRCHRNUL +-extern char *strchrnul(const char *s, int c) FAST_FUNC; +-#endif +- + #ifndef HAVE_STRSEP + extern char *strsep(char **stringp, const char *delim) FAST_FUNC; + #endif diff --git a/packages/busybox/libbb-platform.c.patch b/packages/busybox/libbb-platform.c.patch new file mode 100644 index 000000000..efd0b722f --- /dev/null +++ b/packages/busybox/libbb-platform.c.patch @@ -0,0 +1,19 @@ +diff -uNr busybox-1.29.3/libbb/platform.c busybox-1.29.3.mod/libbb/platform.c +--- busybox-1.29.3/libbb/platform.c 2018-07-02 14:23:06.000000000 +0300 ++++ busybox-1.29.3.mod/libbb/platform.c 2019-02-08 16:10:54.101961593 +0200 +@@ -8,15 +8,6 @@ + */ + #include "libbb.h" + +-#ifndef HAVE_STRCHRNUL +-char* FAST_FUNC strchrnul(const char *s, int c) +-{ +- while (*s != '\0' && *s != c) +- s++; +- return (char*)s; +-} +-#endif +- + #ifndef HAVE_USLEEP + int FAST_FUNC usleep(unsigned usec) + { diff --git a/packages/imagemagick/build.sh b/packages/imagemagick/build.sh index 5da454947..d719c7adb 100644 --- a/packages/imagemagick/build.sh +++ b/packages/imagemagick/build.sh @@ -15,7 +15,6 @@ TERMUX_PKG_EXTRA_CONFIGURE_ARGS=" --with-lzma --disable-openmp ac_cv_func_ftime=no -ac_cv_header_complex_h=no " TERMUX_PKG_RM_AFTER_INSTALL=" bin/Magick-config diff --git a/packages/libelf/config.h.in.patch b/packages/libelf/config.h.in.patch deleted file mode 100644 index f9cc61f9e..000000000 --- a/packages/libelf/config.h.in.patch +++ /dev/null @@ -1,26 +0,0 @@ -diff -u -r ../elfutils-0.168/config.h.in ./config.h.in ---- ../elfutils-0.168/config.h.in 2016-12-28 10:33:20.000000000 +0100 -+++ ./config.h.in 2017-07-09 23:32:21.305290105 +0200 -@@ -1,4 +1,7 @@ - /* config.h.in. Generated from configure.ac by autoheader. */ -+#include /* for basename(3) */ -+#include /* for fputc_unlocked(3) */ -+#define DL_CALL_FCT(f, args) ((*(f)) args) - - /* Building with -fsanitize=undefined or not */ - #undef CHECK_UNDEFINED -@@ -117,4 +120,14 @@ - /* Define for large files, on AIX-style hosts. */ - #undef _LARGE_FILES - -+#ifdef __ANDROID__ -+# ifndef ANDROID_MEMPCPY -+# define ANDROID_MEMPCPY 1 -+static __inline__ void* mempcpy(void* dest, void const* src, size_t n) -+{ -+ return memcpy(dest, src, n) + n; -+} -+# endif -+#endif -+ - #include diff --git a/packages/tar/mkfifoat.patch b/packages/tar/mkfifoat.patch deleted file mode 100644 index e824dfadf..000000000 --- a/packages/tar/mkfifoat.patch +++ /dev/null @@ -1,30 +0,0 @@ -mkfifoat() is available in Android only after API 23. We can't use tar's -implementation of mkfifioat() since it will use tar's implementation of -mknodat(). This will cause infinite recursion in file gnu/at-func.c and -segfault. - -Snippet of backtrace: -.... -#9 0x000000555559819c in mknodat (fd=-100, file=0x7fb7c90050 "sda", mode=25008, dev=2048) at /home/builder/.termux-build/tar/src/gnu/at-func.c:75 -#10 0x000000555559819c in mknodat (fd=-100, file=0x7fb7c90050 "sda", mode=25008, dev=2048) at /home/builder/.termux-build/tar/src/gnu/at-func.c:75 -#11 0x000000555559819c in mknodat (fd=-100, file=0x7fb7c90050 "sda", mode=25008, dev=2048) at /home/builder/.termux-build/tar/src/gnu/at-func.c:75 -#12 0x000000555559819c in mknodat (fd=-100, file=0x7fb7c90050 "sda", mode=25008, dev=2048) at /home/builder/.termux-build/tar/src/gnu/at-func.c:75 -#13 0x000000555556a9d4 in extract_node (file_name=0x7fb7c90050 "sda", typeflag=52) at /home/builder/.termux-build/tar/src/src/extract.c:1447 -#14 0x0000005555568f38 in extract_archive () at /home/builder/.termux-build/tar/src/src/extract.c:1709 -.... - -diff -uNr tar-1.30/src/extract.c tar-1.30.mod/src/extract.c ---- tar-1.30/src/extract.c 2017-12-16 23:23:12.000000000 +0200 -+++ tar-1.30.mod/src/extract.c 2017-12-25 14:31:31.541886176 +0200 -@@ -42,6 +42,11 @@ - # define fchown(fd, uid, gid) (errno = ENOSYS, -1) - #endif - -+static int -+mkfifoat(int fd, const char* path, mode_t mode) { -+ return mknodat(fd, path, (mode & ~S_IFMT) | S_IFIFO, 0); -+} -+ - /* Return true if an error number ERR means the system call is - supported in this case. */ - static bool