mirror of
https://github.com/Ardour/ardour.git
synced 2026-01-09 15:15:41 +01:00
Detect free space on NetBSD
This commit is contained in:
parent
f9c83a04f1
commit
5b1b3a76b5
1 changed files with 7 additions and 2 deletions
|
|
@ -2285,7 +2285,7 @@ Session::save_template (string template_name, bool replace_existing)
|
|||
void
|
||||
Session::refresh_disk_space ()
|
||||
{
|
||||
#if __APPLE__ || __FreeBSD__ || (HAVE_SYS_VFS_H && HAVE_SYS_STATVFS_H)
|
||||
#if __APPLE__ || __FreeBSD__ || __NetBSD__ || (HAVE_SYS_VFS_H && HAVE_SYS_STATVFS_H)
|
||||
|
||||
Glib::Threads::Mutex::Lock lm (space_lock);
|
||||
|
||||
|
|
@ -2295,10 +2295,15 @@ Session::refresh_disk_space ()
|
|||
_total_free_4k_blocks_uncertain = false;
|
||||
|
||||
for (vector<space_and_path>::iterator i = session_dirs.begin(); i != session_dirs.end(); ++i) {
|
||||
#if defined(__NetBSD__)
|
||||
struct statvfs statfsbuf;
|
||||
|
||||
statvfs (i->path.c_str(), &statfsbuf);
|
||||
#else
|
||||
struct statfs statfsbuf;
|
||||
statfs (i->path.c_str(), &statfsbuf);
|
||||
|
||||
statfs (i->path.c_str(), &statfsbuf);
|
||||
#endif
|
||||
double const scale = statfsbuf.f_bsize / 4096.0;
|
||||
|
||||
/* See if this filesystem is read-only */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue