Initial push
[termux-packages] / packages / apt / private-install-no-statvfs.patch
1 diff -u -r ../upstream.git/apt-private/private-install.cc ./apt-private/private-install.cc
2 --- ../upstream.git/apt-private/private-install.cc 2014-03-14 09:05:18.000000000 +0100
3 +++ ./apt-private/private-install.cc 2014-04-15 20:58:34.416703941 +0200
4 @@ -24,7 +24,9 @@
5 #include <stdlib.h>
6 #include <string.h>
7 #include <sys/statfs.h>
8 -#include <sys/statvfs.h>
9 +#ifndef __ANDROID__
10 +# include <sys/statvfs.h>
11 +#endif
12 #include <algorithm>
13 #include <iostream>
14 #include <set>
15 @@ -179,14 +181,14 @@
16 if (_config->FindB("APT::Get::Print-URIs") == false &&
17 _config->FindB("APT::Get::Download",true) == true)
18 {
19 - struct statvfs Buf;
20 + struct statfs Buf;
21 std::string OutputDir = _config->FindDir("Dir::Cache::Archives");
22 - if (statvfs(OutputDir.c_str(),&Buf) != 0) {
23 + if (statfs(OutputDir.c_str(),&Buf) != 0) {
24 if (errno == EOVERFLOW)
25 - return _error->WarningE("statvfs",_("Couldn't determine free space in %s"),
26 + return _error->WarningE("statfs",_("Couldn't determine free space in %s"),
27 OutputDir.c_str());
28 else
29 - return _error->Errno("statvfs",_("Couldn't determine free space in %s"),
30 + return _error->Errno("statfs",_("Couldn't determine free space in %s"),
31 OutputDir.c_str());
32 } else if (unsigned(Buf.f_bfree) < (FetchBytes - FetchPBytes)/Buf.f_bsize)
33 {