summaryrefslogtreecommitdiff
path: root/archive-tar.c
diff options
context:
space:
mode:
Diffstat (limited to 'archive-tar.c')
-rw-r--r--archive-tar.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/archive-tar.c b/archive-tar.c
index 7a535cba24..4aabd566fb 100644
--- a/archive-tar.c
+++ b/archive-tar.c
@@ -142,7 +142,7 @@ static int stream_blocked(const struct object_id *oid)
* string and appends it to a struct strbuf.
*/
static void strbuf_append_ext_header(struct strbuf *sb, const char *keyword,
- const char *value, unsigned int valuelen)
+ const char *value, unsigned int valuelen)
{
int len, tmp;
@@ -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);