Polyfill statfs() and fstatfs() on BSD distros

This commit is contained in:
Justine Tunney 2022-08-17 13:41:21 -07:00
parent e3fe127ccd
commit f7ee9d7d99
42 changed files with 968 additions and 287 deletions

View file

@ -8,6 +8,7 @@
*/
#endif
#include "libc/calls/internal.h"
#include "libc/fmt/conv.h"
#include "libc/fmt/itoa.h"
#include "libc/intrin/bits.h"
#include "libc/macros.internal.h"
@ -30,7 +31,7 @@ uint64_t last;
void plan2(uint64_t addr, uint64_t end, const char *name) {
char sz[32];
FormatMemorySize(sz, end-addr+1, 1024);
sizefmt(sz, end-addr+1, 1024);
printf("%08x-%08x %-6s %s\n", addr>>16, end>>16, sz, name);
}