Commit | Line | Data |
---|---|---|
ee5e9ab1 FF |
1 | diff -u -r ../apt-1.4.7/apt-pkg/contrib/fileutl.cc ./apt-pkg/contrib/fileutl.cc |
2 | --- ../apt-1.4.7/apt-pkg/contrib/fileutl.cc 2017-07-13 23:45:39.000000000 +0200 | |
dc111072 FF |
3 | +++ ./apt-pkg/contrib/fileutl.cc 2017-09-17 20:46:39.567888481 +0200 |
4 | @@ -46,7 +46,9 @@ | |
5 | #include <dirent.h> | |
6 | #include <signal.h> | |
7 | #include <errno.h> | |
8 | +#ifndef __ANDROID__ | |
9 | #include <glob.h> | |
10 | +#endif | |
11 | #include <pwd.h> | |
12 | #include <grp.h> | |
13 | ||
14 | @@ -2752,6 +2754,7 @@ | |
ee5e9ab1 FF |
15 | } |
16 | /*}}}*/ | |
17 | ||
18 | +#ifndef __ANDROID__ | |
19 | // Glob - wrapper around "glob()" /*{{{*/ | |
20 | std::vector<std::string> Glob(std::string const &pattern, int flags) | |
21 | { | |
dc111072 | 22 | @@ -2777,6 +2780,7 @@ |
ee5e9ab1 FF |
23 | globfree(&globbuf); |
24 | return result; | |
25 | } | |
26 | +#endif | |
27 | /*}}}*/ | |
28 | static std::string APT_NONNULL(1) GetTempDirEnv(char const * const env) /*{{{*/ | |
29 | { | |
fd08cf37 HG |
30 | @@ -2794,10 +2794,10 @@ |
31 | struct stat st; | |
32 | if (!tmpdir || strlen(tmpdir) == 0 || // tmpdir is set | |
33 | stat(tmpdir, &st) != 0 || (st.st_mode & S_IFDIR) == 0) // exists and is directory | |
34 | - tmpdir = "/tmp"; | |
35 | + tmpdir = "@TERMUX_PREFIX@/tmp"; | |
36 | else if (geteuid() != 0 && // root can do everything anyway | |
37 | faccessat(AT_FDCWD, tmpdir, R_OK | W_OK | X_OK, AT_EACCESS) != 0) // current user has rwx access to directory | |
38 | - tmpdir = "/tmp"; | |
39 | + tmpdir = "@TERMUX_PREFIX@/tmp"; | |
40 | ||
41 | return string(tmpdir); | |
42 | } | |
ee5e9ab1 FF |
43 | diff -u -r ../apt-1.4.7/apt-pkg/contrib/fileutl.h ./apt-pkg/contrib/fileutl.h |
44 | --- ../apt-1.4.7/apt-pkg/contrib/fileutl.h 2017-07-13 23:45:39.000000000 +0200 | |
dc111072 | 45 | +++ ./apt-pkg/contrib/fileutl.h 2017-08-26 22:05:52.875932441 +0200 |
ee5e9ab1 FF |
46 | @@ -239,7 +239,9 @@ |
47 | APT_HIDDEN std::string flNormalize(std::string file); | |
48 | ||
49 | // simple c++ glob | |
50 | +#ifndef __ANDROID__ | |
51 | std::vector<std::string> Glob(std::string const &pattern, int flags=0); | |
52 | +#endif | |
53 | ||
54 | /** \brief Popen() implementation that execv() instead of using a shell | |
55 | * |