diff options
author | 2015-12-09 22:09:59 -0800 | |
---|---|---|
committer | 2015-12-09 22:09:59 -0800 | |
commit | dd4b0000b600b7a4d08976e92752db2dc3a85b15 (patch) | |
tree | 231ff61d4473d45db9ebbdb42aeca004d6328caa /src/core/transport/chttp2 | |
parent | a7276f6484ea275d7113b114b305a321cb43ee39 (diff) | |
parent | 06ae5cd48c1e235b0980cfca631c94572c7777d8 (diff) |
Merge pull request #4286 from jtattermusch/win_64bit
Make grpc compile on win64bit
Diffstat (limited to 'src/core/transport/chttp2')
-rw-r--r-- | src/core/transport/chttp2/timeout_encoding.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/core/transport/chttp2/timeout_encoding.c b/src/core/transport/chttp2/timeout_encoding.c index 8a9b290ecb..cf81c18a20 100644 --- a/src/core/transport/chttp2/timeout_encoding.c +++ b/src/core/transport/chttp2/timeout_encoding.c @@ -36,6 +36,7 @@ #include <stdio.h> #include <string.h> +#include <grpc/support/port_platform.h> #include "src/core/support/string.h" static int round_up(int x, int divisor) { @@ -57,13 +58,13 @@ static int round_up_to_three_sig_figs(int x) { /* encode our minimum viable timeout value */ static void enc_tiny(char *buffer) { memcpy(buffer, "1n", 3); } -static void enc_ext(char *buffer, long value, char ext) { - int n = gpr_ltoa(value, buffer); +static void enc_ext(char *buffer, gpr_int64 value, char ext) { + int n = gpr_int64toa(value, buffer); buffer[n] = ext; buffer[n + 1] = 0; } -static void enc_seconds(char *buffer, long sec) { +static void enc_seconds(char *buffer, gpr_int64 sec) { if (sec % 3600 == 0) { enc_ext(buffer, sec / 3600, 'H'); } else if (sec % 60 == 0) { |