X-Git-Url: http://git.ipfire.org/?a=blobdiff_plain;f=csum-file.h;h=e54d53d1d0b3537b4fb4b0f22f9699cf38a2c3cf;hb=455e8d18f81583d0270685edc6ec2ed201fc984c;hp=f9cbd317fbbce89547a405783fb5cc69e7815efa;hpb=ff9dccf6155a73b04e3b521d19c449c8635066eb;p=thirdparty%2Fgit.git diff --git a/csum-file.h b/csum-file.h index f9cbd317fb..e54d53d1d0 100644 --- a/csum-file.h +++ b/csum-file.h @@ -62,4 +62,11 @@ static inline void hashwrite_be32(struct hashfile *f, uint32_t data) hashwrite(f, &data, sizeof(data)); } +static inline size_t hashwrite_be64(struct hashfile *f, uint64_t data) +{ + data = htonll(data); + hashwrite(f, &data, sizeof(data)); + return sizeof(data); +} + #endif