shithub: npe

ref: af064114fd7e744e3af0cc67478aab670b5d13c6
dir: /libnpe/stat.c/

View raw version
#include <unistd.h>

#undef stat

int
stat9(char *filename, struct stat9 *buf)
{
	Dir *d;

	if((d = dirstat(filename)) == nil)
		return -1;

	buf->st_size = d->length;
	buf->st_mode = d->mode;
	free(d);

	return 0;
}