diff options
author | Yash Tibrewal <yashkt@google.com> | 2017-09-25 16:45:02 -0700 |
---|---|---|
committer | Yash Tibrewal <yashkt@google.com> | 2017-10-02 16:32:27 -0700 |
commit | 37fdb739607895335c748e42cd25170545a00d6c (patch) | |
tree | 2a2cc2e82bb42ec6f978376e5b5b93c222563da7 /src/core/ext | |
parent | fcd26bcd0f9091389915858ae0ac404b3c8748b9 (diff) |
More build errors
Diffstat (limited to 'src/core/ext')
4 files changed, 38 insertions, 47 deletions
diff --git a/src/core/ext/filters/client_channel/client_channel.cc b/src/core/ext/filters/client_channel/client_channel.cc index 47ec5fe24a..8bff7548ac 100644 --- a/src/core/ext/filters/client_channel/client_channel.cc +++ b/src/core/ext/filters/client_channel/client_channel.cc @@ -16,6 +16,8 @@ * */ +#include <grpc/support/port_platform.h> + #include "src/core/ext/filters/client_channel/client_channel.h" #include <inttypes.h> diff --git a/src/core/ext/filters/client_channel/resolver/dns/native/dns_resolver.cc b/src/core/ext/filters/client_channel/resolver/dns/native/dns_resolver.cc index 1baf80b720..1c093d0ad2 100644 --- a/src/core/ext/filters/client_channel/resolver/dns/native/dns_resolver.cc +++ b/src/core/ext/filters/client_channel/resolver/dns/native/dns_resolver.cc @@ -16,6 +16,9 @@ * */ +#include <grpc/support/port_platform.h> + +#include <inttypes.h> #include <string.h> #include <grpc/support/alloc.h> diff --git a/src/core/ext/transport/chttp2/transport/chttp2_transport.cc b/src/core/ext/transport/chttp2/transport/chttp2_transport.cc index 9fc1b29138..d6a9aab7d6 100644 --- a/src/core/ext/transport/chttp2/transport/chttp2_transport.cc +++ b/src/core/ext/transport/chttp2/transport/chttp2_transport.cc @@ -18,6 +18,9 @@ #include "src/core/ext/transport/chttp2/transport/chttp2_transport.h" +#include <grpc/support/port_platform.h> + +#include <inttypes.h> #include <limits.h> #include <math.h> #include <stdio.h> @@ -434,13 +437,11 @@ static void init_transport(grpc_exec_ctx *exec_ctx, grpc_chttp2_transport *t, GRPC_ARG_HTTP2_MAX_PINGS_WITHOUT_DATA)) { t->ping_policy.max_pings_without_data = grpc_channel_arg_get_integer( &channel_args->args[i], - (grpc_integer_options){g_default_max_pings_without_data, 0, - INT_MAX}); + {g_default_max_pings_without_data, 0, INT_MAX}); } else if (0 == strcmp(channel_args->args[i].key, GRPC_ARG_HTTP2_MAX_PING_STRIKES)) { t->ping_policy.max_ping_strikes = grpc_channel_arg_get_integer( - &channel_args->args[i], - (grpc_integer_options){g_default_max_ping_strikes, 0, INT_MAX}); + &channel_args->args[i], {g_default_max_ping_strikes, 0, INT_MAX}); } else if (0 == strcmp( channel_args->args[i].key, @@ -449,9 +450,8 @@ static void init_transport(grpc_exec_ctx *exec_ctx, grpc_chttp2_transport *t, gpr_time_from_millis( grpc_channel_arg_get_integer( &channel_args->args[i], - (grpc_integer_options){ - g_default_min_sent_ping_interval_without_data_ms, 0, - INT_MAX}), + {g_default_min_sent_ping_interval_without_data_ms, 0, + INT_MAX}), GPR_TIMESPAN); } else if (0 == strcmp( @@ -461,27 +461,24 @@ static void init_transport(grpc_exec_ctx *exec_ctx, grpc_chttp2_transport *t, gpr_time_from_millis( grpc_channel_arg_get_integer( &channel_args->args[i], - (grpc_integer_options){ - g_default_min_recv_ping_interval_without_data_ms, 0, - INT_MAX}), + {g_default_min_recv_ping_interval_without_data_ms, 0, + INT_MAX}), GPR_TIMESPAN); } else if (0 == strcmp(channel_args->args[i].key, GRPC_ARG_HTTP2_WRITE_BUFFER_SIZE)) { t->write_buffer_size = (uint32_t)grpc_channel_arg_get_integer( - &channel_args->args[i], - (grpc_integer_options){0, 0, MAX_WRITE_BUFFER_SIZE}); + &channel_args->args[i], {0, 0, MAX_WRITE_BUFFER_SIZE}); } else if (0 == strcmp(channel_args->args[i].key, GRPC_ARG_HTTP2_BDP_PROBE)) { - t->flow_control.enable_bdp_probe = grpc_channel_arg_get_integer( - &channel_args->args[i], (grpc_integer_options){1, 0, 1}); + t->flow_control.enable_bdp_probe = + grpc_channel_arg_get_integer(&channel_args->args[i], {1, 0, 1}); } else if (0 == strcmp(channel_args->args[i].key, GRPC_ARG_KEEPALIVE_TIME_MS)) { const int value = grpc_channel_arg_get_integer( &channel_args->args[i], - (grpc_integer_options){t->is_client - ? g_default_client_keepalive_time_ms - : g_default_server_keepalive_time_ms, - 1, INT_MAX}); + {t->is_client ? g_default_client_keepalive_time_ms + : g_default_server_keepalive_time_ms, + 1, INT_MAX}); t->keepalive_time = value == INT_MAX ? gpr_inf_future(GPR_TIMESPAN) : gpr_time_from_millis(value, GPR_TIMESPAN); @@ -489,18 +486,17 @@ static void init_transport(grpc_exec_ctx *exec_ctx, grpc_chttp2_transport *t, GRPC_ARG_KEEPALIVE_TIMEOUT_MS)) { const int value = grpc_channel_arg_get_integer( &channel_args->args[i], - (grpc_integer_options){t->is_client - ? g_default_client_keepalive_timeout_ms - : g_default_server_keepalive_timeout_ms, - 0, INT_MAX}); + {t->is_client ? g_default_client_keepalive_timeout_ms + : g_default_server_keepalive_timeout_ms, + 0, INT_MAX}); t->keepalive_timeout = value == INT_MAX ? gpr_inf_future(GPR_TIMESPAN) : gpr_time_from_millis(value, GPR_TIMESPAN); } else if (0 == strcmp(channel_args->args[i].key, GRPC_ARG_KEEPALIVE_PERMIT_WITHOUT_CALLS)) { t->keepalive_permit_without_calls = - (uint32_t)grpc_channel_arg_get_integer( - &channel_args->args[i], (grpc_integer_options){0, 0, 1}); + (uint32_t)grpc_channel_arg_get_integer(&channel_args->args[i], + {0, 0, 1}); } else if (0 == strcmp(channel_args->args[i].key, GRPC_ARG_OPTIMIZATION_TARGET)) { if (channel_args->args[i].type != GRPC_ARG_STRING) { @@ -2627,9 +2623,7 @@ void grpc_chttp2_config_default_keepalive_args(grpc_channel_args *args, for (i = 0; i < args->num_args; i++) { if (0 == strcmp(args->args[i].key, GRPC_ARG_KEEPALIVE_TIME_MS)) { const int value = grpc_channel_arg_get_integer( - &args->args[i], - (grpc_integer_options){g_default_client_keepalive_time_ms, 1, - INT_MAX}); + &args->args[i], {g_default_client_keepalive_time_ms, 1, INT_MAX}); if (is_client) { g_default_client_keepalive_time_ms = value; } else { @@ -2639,8 +2633,7 @@ void grpc_chttp2_config_default_keepalive_args(grpc_channel_args *args, strcmp(args->args[i].key, GRPC_ARG_KEEPALIVE_TIMEOUT_MS)) { const int value = grpc_channel_arg_get_integer( &args->args[i], - (grpc_integer_options){g_default_client_keepalive_timeout_ms, 0, - INT_MAX}); + {g_default_client_keepalive_timeout_ms, 0, INT_MAX}); if (is_client) { g_default_client_keepalive_timeout_ms = value; } else { @@ -2651,8 +2644,7 @@ void grpc_chttp2_config_default_keepalive_args(grpc_channel_args *args, g_default_keepalive_permit_without_calls = (uint32_t)grpc_channel_arg_get_integer( &args->args[i], - (grpc_integer_options){g_default_keepalive_permit_without_calls, - 0, 1}); + {g_default_keepalive_permit_without_calls, 0, 1}); } else if (0 == strcmp(args->args[i].key, GRPC_ARG_HTTP2_MAX_PING_STRIKES)) { g_default_max_ping_strikes = grpc_channel_arg_get_integer( @@ -2661,8 +2653,7 @@ void grpc_chttp2_config_default_keepalive_args(grpc_channel_args *args, } else if (0 == strcmp(args->args[i].key, GRPC_ARG_HTTP2_MAX_PINGS_WITHOUT_DATA)) { g_default_max_pings_without_data = grpc_channel_arg_get_integer( - &args->args[i], (grpc_integer_options){ - g_default_max_pings_without_data, 0, INT_MAX}); + &args->args[i], {g_default_max_pings_without_data, 0, INT_MAX}); } else if (0 == strcmp( args->args[i].key, @@ -2670,9 +2661,7 @@ void grpc_chttp2_config_default_keepalive_args(grpc_channel_args *args, g_default_min_sent_ping_interval_without_data_ms = grpc_channel_arg_get_integer( &args->args[i], - (grpc_integer_options){ - g_default_min_sent_ping_interval_without_data_ms, 0, - INT_MAX}); + {g_default_min_sent_ping_interval_without_data_ms, 0, INT_MAX}); } else if (0 == strcmp( args->args[i].key, @@ -2680,9 +2669,7 @@ void grpc_chttp2_config_default_keepalive_args(grpc_channel_args *args, g_default_min_recv_ping_interval_without_data_ms = grpc_channel_arg_get_integer( &args->args[i], - (grpc_integer_options){ - g_default_min_recv_ping_interval_without_data_ms, 0, - INT_MAX}); + {g_default_min_recv_ping_interval_without_data_ms, 0, INT_MAX}); } } } diff --git a/src/core/ext/transport/chttp2/transport/writing.cc b/src/core/ext/transport/chttp2/transport/writing.cc index 399b1608bd..ba3d55abb3 100644 --- a/src/core/ext/transport/chttp2/transport/writing.cc +++ b/src/core/ext/transport/chttp2/transport/writing.cc @@ -431,17 +431,16 @@ grpc_chttp2_begin_write_result grpc_chttp2_begin_write( &s->stats.outgoing, &t->outbuf); } else { grpc_encode_header_options hopt = { - .stream_id = s->id, - .is_eof = true, - .use_true_binary_metadata = - t->settings + s->id, true, + + t->settings [GRPC_PEER_SETTINGS] [GRPC_CHTTP2_SETTINGS_GRPC_ALLOW_TRUE_BINARY_METADATA] != 0, - .max_frame_size = - t->settings[GRPC_PEER_SETTINGS] - [GRPC_CHTTP2_SETTINGS_MAX_FRAME_SIZE], - .stats = &s->stats.outgoing}; + + t->settings[GRPC_PEER_SETTINGS] + [GRPC_CHTTP2_SETTINGS_MAX_FRAME_SIZE], + &s->stats.outgoing}; grpc_chttp2_encode_header(exec_ctx, &t->hpack_compressor, extra_headers_for_trailing_metadata, num_extra_headers_for_trailing_metadata, |