diff options
author | Igor Pashev <pashev.igor@gmail.com> | 2014-02-02 15:51:57 +0400 |
---|---|---|
committer | Igor Pashev <pashev.igor@gmail.com> | 2014-02-02 16:19:02 +0400 |
commit | 04b456fc2b72726305402d9c4ce5b3e5c681eb65 (patch) | |
tree | bb75177557ada1471b28b385dfe0df249cf0aa07 /cmdline | |
parent | 4d73d4ad683882b97ea11f88901f4c9cd410e6f0 (diff) | |
download | apt-04b456fc2b72726305402d9c4ce5b3e5c681eb65.tar.gz |
RAMFS_MAGIC is linux-specific
Diffstat (limited to 'cmdline')
-rw-r--r-- | cmdline/apt-get.cc | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/cmdline/apt-get.cc b/cmdline/apt-get.cc index bcfe1160..c3c7aab6 100644 --- a/cmdline/apt-get.cc +++ b/cmdline/apt-get.cc @@ -875,13 +875,15 @@ bool DoSource(CommandLine &CmdL) OutputDir.c_str()); } else if (unsigned(Buf.f_bfree) < (FetchBytes - FetchPBytes)/Buf.f_bsize) { + //TODO: illumos/solaris: check statvfs.f_basetype[FSTYPSZ] +#if HAVE_STRUCT_STATFS_F_TYPE && defined(RAMFS_MAGIC) struct statfs Stat; if (statfs(OutputDir.c_str(),&Stat) != 0 -#if HAVE_STRUCT_STATFS_F_TYPE || unsigned(Stat.f_type) != RAMFS_MAGIC + ) #endif - ) { - delete[] Dsc; + { + delete[] Dsc; return _error->Error(_("You don't have enough free space in %s"), OutputDir.c_str()); } |