diff options
author | David Kalnischkies <kalnischkies@gmail.com> | 2009-08-09 10:21:00 +0200 |
---|---|---|
committer | David Kalnischkies <kalnischkies@gmail.com> | 2009-08-09 10:21:00 +0200 |
commit | f64196e879103151f3b90ba423dc74ef61ea8c76 (patch) | |
tree | 198b565124e4d9d5cc4cdc724b3dcd380196b5f4 /cmdline | |
parent | 6e2525a1d9c0930fea9fa65514d7b813f27997f0 (diff) |
[cmdline/apt-get.cc] check for availability ofstatfs.f_type
Patch from Robert Millan, thanks! (Closes: #509313)
Diffstat (limited to 'cmdline')
-rw-r--r-- | cmdline/apt-get.cc | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/cmdline/apt-get.cc b/cmdline/apt-get.cc index ebb634b4f..384953a6b 100644 --- a/cmdline/apt-get.cc +++ b/cmdline/apt-get.cc @@ -868,8 +868,11 @@ bool InstallPackages(CacheFile &Cache,bool ShwKept,bool Ask = true, if (unsigned(Buf.f_bfree) < (FetchBytes - FetchPBytes)/Buf.f_bsize) { struct statfs Stat; - if (statfs(OutputDir.c_str(),&Stat) != 0 || - unsigned(Stat.f_type) != RAMFS_MAGIC) + if (statfs(OutputDir.c_str(),&Stat) != 0 +#if HAVE_STRUCT_STATFS_F_TYPE + || unsigned(Stat.f_type) != RAMFS_MAGIC +#endif + ) return _error->Error(_("You don't have enough free space in %s."), OutputDir.c_str()); } @@ -2201,8 +2204,11 @@ bool DoSource(CommandLine &CmdL) if (unsigned(Buf.f_bfree) < (FetchBytes - FetchPBytes)/Buf.f_bsize) { struct statfs Stat; - if (statfs(OutputDir.c_str(),&Stat) != 0 || - unsigned(Stat.f_type) != RAMFS_MAGIC) + if (statfs(OutputDir.c_str(),&Stat) != 0 +#if HAVE_STRUCT_STATFS_F_TYPE + || unsigned(Stat.f_type) != RAMFS_MAGIC +#endif + ) return _error->Error(_("You don't have enough free space in %s"), OutputDir.c_str()); } |