diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/cc-compat.h | 2 | ||||
-rw-r--r-- | src/transports/smart_protocol.c | 2 |
2 files changed, 3 insertions, 1 deletions
diff --git a/src/cc-compat.h b/src/cc-compat.h index cc7c90859..a5e4ce17e 100644 --- a/src/cc-compat.h +++ b/src/cc-compat.h @@ -38,8 +38,10 @@ /* Define the printf format specifer to use for size_t output */ #if defined(_MSC_VER) || defined(__MINGW32__) # define PRIuZ "Iu" +# define PRIxZ "Ix" #else # define PRIuZ "zu" +# define PRIxZ "zx" #endif /* Micosoft Visual C/C++ */ diff --git a/src/transports/smart_protocol.c b/src/transports/smart_protocol.c index 5896215c9..184b21a0b 100644 --- a/src/transports/smart_protocol.c +++ b/src/transports/smart_protocol.c @@ -541,7 +541,7 @@ static int gen_pktline(git_buf *buf, git_push *push) git_oid_fmt(old_id, &spec->roid); git_oid_fmt(new_id, &spec->loid); - git_buf_printf(buf, "%04zx%s %s %s", len, old_id, new_id, spec->rref); + git_buf_printf(buf, "%04"PRIxZ"%s %s %s", len, old_id, new_id, spec->rref); if (i == 0) { git_buf_putc(buf, '\0'); |