Equivalent of sys/vfs.h for haiku?

I can’t find the ( struct statfs var; ) type in any header file in the posix subdirs.
Any idea how to deal with this type.

#include <sys/statvfs.h>?

1 Like

I already did replace it with sys/statvfs.h, i got a the following error

emimicon.cpp: In static member function ‘static QHash<QString, long long int> EMimIcon::getDriveInfo(QString)’:
emimicon.cpp:805:20: error: aggregate ‘EMimIcon::getDriveInfo(QString)::statfs info’ has incomplete type and cannot be defined
struct statfs info;
^
emimicon.cpp:806:38: error: invalid use of incomplete type ‘struct EMimIcon::getDriveInfo(QString)::statfs’
statfs(path.toLocal8Bit(), &info);
^
emimicon.cpp:805:13: note: forward declaration of ‘struct EMimIcon::getDriveInfo(QString)::statfs’
struct statfs info;

Which suggests maybe that there is more to it? it’s just a Qt filemanager.
I’d appreciate some help to get passed this error.

we don’t have a struct statfs, only a struct statvfs, which is similar but not identical. I’m not sure why Linux has both. statfs is Linux-specific, statvfs is standard POSIX.

Well, the only way i found is to go the brutal way and replace sys/vfs.h with sys/statvfs.h and the occurences of statfs with statvfs which got me the binary but doesn’t launch because of a missing library which i had just patched, so will investigate.[quote=“PulkoMandy, post:4, topic:6346”]
I’m not sure why Linux has both. statfs is Linux-specific, statvfs is standard POSIX.
[/quote]

From what i read on the net statfs supports lager files than statvfs which has a 2 TB limit.