fix the definition of struct statvfs to match lsb abi
[musl] / include / sys / statvfs.h
1 #ifndef _SYS_STATVFS_H
2 #define _SYS_STATVFS_H
3
4
5 #define __NEED_fsblkcnt_t
6 #define __NEED_fsfilcnt_t
7 #include <bits/alltypes.h>
8
9 #include <endian.h>
10
11 struct statvfs {
12         unsigned long f_bsize, f_frsize;
13         fsblkcnt_t f_blocks, f_bfree, f_bavail;
14         fsfilcnt_t f_files, f_ffree, f_favail;
15 #if __BYTE_ORDER == __LITTLE_ENDIAN
16         unsigned long f_fsid;
17         unsigned :8*(2*sizeof(int)-sizeof(long));
18 #else
19         unsigned :8*(2*sizeof(int)-sizeof(long));
20         unsigned long f_fsid;
21 #endif
22         unsigned long f_flag, f_namemax;
23         int __reserved[6];
24 };
25
26 int statvfs (const char *, struct statvfs *);
27 int fstatvfs (int, struct statvfs *);
28
29 #define ST_RDONLY 1
30 #define ST_NOSUID 2
31 #define ST_NODEV  4
32 #define ST_NOEXEC 8
33 #define ST_SYNCHRONOUS 16
34 #define ST_MANDLOCK    64
35 #define ST_WRITE       128
36 #define ST_APPEND      256
37 #define ST_IMMUTABLE   512
38 #define ST_NOATIME     1024
39 #define ST_NODIRATIME  2048
40
41
42 #endif