summaryrefslogtreecommitdiff
path: root/cmdline
diff options
context:
space:
mode:
Diffstat (limited to 'cmdline')
-rw-r--r--cmdline/apt-get.cc14
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());
}