summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/system.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/system.h b/lib/system.h
index 32b2c5a..0d7fd9a 100644
--- a/lib/system.h
+++ b/lib/system.h
@@ -386,9 +386,13 @@ extern int errno;
#endif
#ifndef ST_NBLOCKSIZE
-#define ST_NBLOCKSIZE 512
+# define ST_NBLOCKSIZE 512
#endif
+#define ST_IS_SPARSE(st) \
+ (ST_NBLOCKS (st) \
+ < ((st).st_size / ST_NBLOCKSIZE + ((st).st_size % ST_NBLOCKSIZE != 0)))
+
/* Declare standard functions. */
#if STDC_HEADERS