You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
55 lines
1.7 KiB
55 lines
1.7 KiB
diff -u -r ../apt-1.4.7/apt-pkg/contrib/fileutl.cc ./apt-pkg/contrib/fileutl.cc
|
|
--- ../apt-1.4.7/apt-pkg/contrib/fileutl.cc 2017-07-13 23:45:39.000000000 +0200
|
|
+++ ./apt-pkg/contrib/fileutl.cc 2017-09-17 20:46:39.567888481 +0200
|
|
@@ -46,7 +46,9 @@
|
|
#include <dirent.h>
|
|
#include <signal.h>
|
|
#include <errno.h>
|
|
+#ifndef __ANDROID__
|
|
#include <glob.h>
|
|
+#endif
|
|
#include <pwd.h>
|
|
#include <grp.h>
|
|
|
|
@@ -2752,6 +2754,7 @@
|
|
}
|
|
/*}}}*/
|
|
|
|
+#ifndef __ANDROID__
|
|
// Glob - wrapper around "glob()" /*{{{*/
|
|
std::vector<std::string> Glob(std::string const &pattern, int flags)
|
|
{
|
|
@@ -2777,6 +2780,7 @@
|
|
globfree(&globbuf);
|
|
return result;
|
|
}
|
|
+#endif
|
|
/*}}}*/
|
|
static std::string APT_NONNULL(1) GetTempDirEnv(char const * const env) /*{{{*/
|
|
{
|
|
@@ -2794,10 +2794,10 @@
|
|
struct stat st;
|
|
if (!tmpdir || strlen(tmpdir) == 0 || // tmpdir is set
|
|
stat(tmpdir, &st) != 0 || (st.st_mode & S_IFDIR) == 0) // exists and is directory
|
|
- tmpdir = "/tmp";
|
|
+ tmpdir = "@TERMUX_PREFIX@/tmp";
|
|
else if (geteuid() != 0 && // root can do everything anyway
|
|
faccessat(AT_FDCWD, tmpdir, R_OK | W_OK | X_OK, AT_EACCESS) != 0) // current user has rwx access to directory
|
|
- tmpdir = "/tmp";
|
|
+ tmpdir = "@TERMUX_PREFIX@/tmp";
|
|
|
|
return string(tmpdir);
|
|
}
|
|
diff -u -r ../apt-1.4.7/apt-pkg/contrib/fileutl.h ./apt-pkg/contrib/fileutl.h
|
|
--- ../apt-1.4.7/apt-pkg/contrib/fileutl.h 2017-07-13 23:45:39.000000000 +0200
|
|
+++ ./apt-pkg/contrib/fileutl.h 2017-08-26 22:05:52.875932441 +0200
|
|
@@ -239,7 +239,9 @@
|
|
APT_HIDDEN std::string flNormalize(std::string file);
|
|
|
|
// simple c++ glob
|
|
+#ifndef __ANDROID__
|
|
std::vector<std::string> Glob(std::string const &pattern, int flags=0);
|
|
+#endif
|
|
|
|
/** \brief Popen() implementation that execv() instead of using a shell
|
|
*
|
|
|