X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=git-compat-util.h;h=6ee325546ec4ca1a9000d02ab2aee918e2a4efc2;hb=d8eec50468a64b23e1013bac9e78fc447af046ca;hp=cf89cdf4598b3796724a85aa707f740245155cdc;hpb=731ab1f55e7ba736b24708a63e93a7c8d581a4d6;p=git.git diff --git a/git-compat-util.h b/git-compat-util.h index cf89cdf45..6ee325546 100644 --- a/git-compat-util.h +++ b/git-compat-util.h @@ -99,6 +99,11 @@ #include #endif +#ifndef NO_OPENSSL +#include +#include +#endif + /* On most systems would have given us this, but * not on some systems (e.g. GNU/Hurd). */ @@ -192,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))