git-submodule - Use "get_default_remote" from git-parse-remote
[gitweb.git] / git-compat-util.h
index fbf791a63b95540b3dc9fc94e950acfdf10f12d6..6ee325546ec4ca1a9000d02ab2aee918e2a4efc2 100644 (file)
@@ -197,6 +197,12 @@ extern int git_munmap(void *start, size_t length);
 
 #endif /* NO_MMAP */
 
+#ifdef NO_ST_BLOCKS_IN_STRUCT_STAT
+#define on_disk_bytes(st) ((st).st_size)
+#else
+#define on_disk_bytes(st) ((st).st_blocks * 512)
+#endif
+
 #define DEFAULT_PACKED_GIT_LIMIT \
        ((1024L * 1024L) * (sizeof(void*) >= 8 ? 8192 : 256))