From 970b17acd321b27dfb81d0a9447cc8404d6d602e Mon Sep 17 00:00:00 2001 From: Nguyễn Thái Ngọc Duy Date: Tue, 13 Apr 2010 21:55:18 +0200 Subject: win32: ls: ignore stat.st_blocks on Windows --- coreutils/ls.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/coreutils/ls.c b/coreutils/ls.c index 1197f7d71..c7b2161db 100644 --- a/coreutils/ls.c +++ b/coreutils/ls.c @@ -612,7 +612,12 @@ static NOINLINE unsigned list_single(const struct dnode *dn) if (all_fmt & LIST_INO) column += printf("%7llu ", (long long) dn->dstat.st_ino); if (all_fmt & LIST_BLOCKS) +#if ENABLE_PLATFORM_MINGW32 + /* MinGW does not have st_blocks */ + column += printf("%4"OFF_FMT"u ", (off_t)0); +#else column += printf("%4"OFF_FMT"u ", (off_t) (dn->dstat.st_blocks >> 1)); +#endif if (all_fmt & LIST_MODEBITS) column += printf("%-10s ", (char *) bb_mode_string(dn->dstat.st_mode)); if (all_fmt & LIST_NLINKS) -- cgit v1.2.3-55-g6feb