Browse Source

mlocate: Make it work on Android 7.0 (fixes #1454)

android-5
Fredrik Fornwall 7 years ago
parent
commit
13e237a06e
  1. 2
      packages/mlocate/build.sh
  2. 18
      packages/mlocate/src-locate.c.patch

2
packages/mlocate/build.sh

@ -1,7 +1,7 @@
TERMUX_PKG_HOMEPAGE=https://pagure.io/mlocate
TERMUX_PKG_DESCRIPTION="Tool to find files anywhere in the filesystem based on their name"
TERMUX_PKG_VERSION=0.26
TERMUX_PKG_REVISION=1
TERMUX_PKG_REVISION=2
TERMUX_PKG_SRCURL=https://releases.pagure.org/mlocate/mlocate-${TERMUX_PKG_VERSION}.tar.xz
TERMUX_PKG_SHA256=3063df79fe198fb9618e180c54baf3105b33d88fe602ff2d8570aaf944f1263e

18
packages/mlocate/src-locate.c.patch

@ -0,0 +1,18 @@
Do not fail if "/" is not accessible - which it is not on Android starting
with Android 7.0.
diff -u -r ../mlocate-0.26/src/locate.c ./src/locate.c
--- ../mlocate-0.26/src/locate.c 2012-09-22 03:48:54.000000000 +0200
+++ ./src/locate.c 2017-09-22 20:57:44.062275402 +0200
@@ -1026,11 +1027,6 @@
uc_obstack_mark = obstack_alloc (&uc_obstack, 0);
obstack_init (&check_stack_obstack);
res = EXIT_FAILURE;
- /* Don't call access ("/", R_OK | X_OK) all the time. This is too strict,
- it is possible to have "/" --x and have a database describing a
- subdirectory, but that is just too improbable. */
- if (conf_statistics == false && access ("/", R_OK | X_OK) != 0)
- goto done;
for (i = 0; i < conf_dbpath.len; i++)
{
if (conf_output_limit_set != false && matches_found >= conf_output_limit)
Loading…
Cancel
Save