X-Git-Url: http://git.ipfire.org/?a=blobdiff_plain;f=archive-tar.c;h=a58e1a8ebf874afc856b03f2203ee32d79183b31;hb=3173a94d577e14501039e85f333e9c98cbd92667;hp=7a535cba24a2a0535b412f1cfb3531ddde155c1e;hpb=3ae0ac65cff232db66282efa931c0e7e83a60e24;p=thirdparty%2Fgit.git diff --git a/archive-tar.c b/archive-tar.c index 7a535cba24..a58e1a8ebf 100644 --- a/archive-tar.c +++ b/archive-tar.c @@ -202,7 +202,7 @@ static void prepare_header(struct archiver_args *args, unsigned int mode, unsigned long size) { xsnprintf(header->mode, sizeof(header->mode), "%07o", mode & 07777); - xsnprintf(header->size, sizeof(header->size), "%011lo", S_ISREG(mode) ? size : 0); + xsnprintf(header->size, sizeof(header->size), "%011"PRIoMAX , S_ISREG(mode) ? (uintmax_t)size : (uintmax_t)0); xsnprintf(header->mtime, sizeof(header->mtime), "%011lo", (unsigned long) args->time); xsnprintf(header->uid, sizeof(header->uid), "%07o", 0);