1 diff -u -r ../upstream.git/apt-pkg/contrib/fileutl.cc ./apt-pkg/contrib/fileutl.cc
2 --- ../upstream.git/apt-pkg/contrib/fileutl.cc 2014-05-05 14:01:59.000000000 +0200
3 +++ ./apt-pkg/contrib/fileutl.cc 2014-06-06 00:09:17.233239376 +0200
18 - if (chdir("/tmp/") != 0)
19 + if (chdir("@TERMUX_PREFIX@/tmp/") != 0)
22 unsigned int Count = 1;
23 @@ -1883,7 +1885,11 @@
24 FileFdErrno("read","Unable to read original size of gzipped file");
28 + size = letoh32(size);
33 if (lseek(iFd, oldPos, SEEK_SET) < 0)
36 std::vector<std::string> Glob(std::string const &pattern, int flags)
38 std::vector<std::string> result;
44 result.push_back(string(globbuf.gl_pathv[i]));
51 @@ -2025,15 +2033,10 @@
53 const char *tmpdir = getenv("TMPDIR");
60 // check that tmpdir is set and exists
62 if (!tmpdir || strlen(tmpdir) == 0 || stat(tmpdir, &st) != 0)
64 + tmpdir = "@TERMUX_PREFIX@/tmp";
66 return string(tmpdir);