Adds statfs() support to other unix.

This commit is contained in:
Andrea Mazzoleni 2013-08-29 00:23:14 +02:00
parent e4e13a669b
commit bec047b0b3
3 changed files with 47 additions and 30 deletions

4
unix.c
View file

@ -170,9 +170,7 @@ int filephy(const char* path, struct stat* st, uint64_t* physical)
int fsinfo(const char* path, int* has_persistent_inode)
{
/* statfs() is really not portable, and to limit possible incompatibility we limit it to Linux */
/* for example, Solaris doesn't have the f_type field, BSD has it as "short" */
#if HAVE_STATFS && HAVE_STRUCT_STATFS_F_TYPE && defined(__linux__)
#if HAVE_STATFS && HAVE_STRUCT_STATFS_F_TYPE
struct statfs st;
if (statfs(path, &st) != 0)