@@ -84,7 +84,57 @@ version (CRuntime_Glibc) {
84
84
int statvfs (const char * file, statvfs_t* buf);
85
85
int fstatvfs (int fildes, statvfs_t * buf);
86
86
}
87
+ }
88
+ else version (CRuntime_Musl )
89
+ {
90
+ struct statvfs_t
91
+ {
92
+ c_ulong f_bsize;
93
+ c_ulong f_frsize;
94
+ fsblkcnt_t f_blocks;
95
+ fsblkcnt_t f_bfree;
96
+ fsblkcnt_t f_bavail;
97
+ fsfilcnt_t f_files;
98
+ fsfilcnt_t f_ffree;
99
+ fsfilcnt_t f_favail;
100
+ static if (true /+ __BYTE_ORDER == __LITTLE_ENDIAN+/ )
101
+ {
102
+ c_ulong f_fsid;
103
+ byte [2 * int .sizeof- c_long.sizeof] __padding;
104
+ }
105
+ else
106
+ {
107
+ byte [2 * int .sizeof- c_long.sizeof] __padding;
108
+ c_ulong f_fsid;
109
+ }
110
+ c_ulong f_flag;
111
+ c_ulong f_namemax;
112
+ uint f_type;
113
+ int [5 ] __reserved;
114
+ }
115
+
116
+ enum FFlag
117
+ {
118
+ ST_RDONLY = 1 , /* Mount read-only. */
119
+ ST_NOSUID = 2 ,
120
+ ST_NODEV = 4 , /* Disallow access to device special files. */
121
+ ST_NOEXEC = 8 , /* Disallow program execution. */
122
+ ST_SYNCHRONOUS = 16 , /* Writes are synced at once. */
123
+ ST_MANDLOCK = 64 , /* Allow mandatory locks on an FS. */
124
+ ST_WRITE = 128 , /* Write on file/directory/symlink. */
125
+ ST_APPEND = 256 , /* Append-only file. */
126
+ ST_IMMUTABLE = 512 , /* Immutable file. */
127
+ ST_NOATIME = 1024 , /* Do not update access times. */
128
+ ST_NODIRATIME = 2048 , /* Do not update directory access times. */
129
+ ST_RELATIME = 4096 /* Update atime relative to mtime/ctime. */
130
+
131
+ }
132
+
133
+ int statvfs (const char * file, statvfs_t* buf);
134
+ int fstatvfs (int fildes, statvfs_t * buf);
87
135
136
+ alias statvfs statvfs64;
137
+ alias fstatvfs fstatvfs64;
88
138
}
89
139
else version (NetBSD )
90
140
{
0 commit comments