diff --git a/include/grpc/byte_buffer.h b/include/grpc/byte_buffer.h index 0ff494cdec9..06077a02a91 100644 --- a/include/grpc/byte_buffer.h +++ b/include/grpc/byte_buffer.h @@ -37,6 +37,10 @@ #include #include +#ifdef __cplusplus +extern "C" { +#endif + typedef enum { GRPC_BB_SLICE_BUFFER } grpc_byte_buffer_type; /* byte buffers are containers for messages passed in from the public api's */ @@ -47,4 +51,8 @@ struct grpc_byte_buffer { } data; }; +#ifdef __cplusplus +} +#endif + #endif /* GRPC_BYTE_BUFFER_H */ diff --git a/include/grpc/byte_buffer_reader.h b/include/grpc/byte_buffer_reader.h index cb757cf6420..d3da27cf1c2 100644 --- a/include/grpc/byte_buffer_reader.h +++ b/include/grpc/byte_buffer_reader.h @@ -37,6 +37,10 @@ #include #include +#ifdef __cplusplus +extern "C" { +#endif + struct grpc_byte_buffer_reader { grpc_byte_buffer *buffer; /* Different current objects correspond to different types of byte buffers */ @@ -46,4 +50,8 @@ struct grpc_byte_buffer_reader { } current; }; +#ifdef __cplusplus +} +#endif + #endif /* GRPC_BYTE_BUFFER_READER_H */ diff --git a/include/grpc/census.h b/include/grpc/census.h index 5f08c10032f..b2049b3289b 100644 --- a/include/grpc/census.h +++ b/include/grpc/census.h @@ -40,6 +40,10 @@ #include +#ifdef __cplusplus +extern "C" { +#endif + /* Identify census functionality that can be enabled via census_initialize(). */ enum census_functions { CENSUS_NONE = 0, /* Do not enable census. */ @@ -92,4 +96,8 @@ int census_context_deserialize(const char *buffer, census_context **context); * future census calls will result in undefined behavior. */ void census_context_destroy(census_context *context); +#ifdef __cplusplus +} +#endif + #endif /* CENSUS_CENSUS_H */ diff --git a/include/grpc/grpc_security.h b/include/grpc/grpc_security.h index d7ed2d8ce0c..82f8f442a3b 100644 --- a/include/grpc/grpc_security.h +++ b/include/grpc/grpc_security.h @@ -34,8 +34,8 @@ #ifndef GRPC_GRPC_SECURITY_H #define GRPC_GRPC_SECURITY_H -#include "grpc.h" -#include "status.h" +#include +#include #ifdef __cplusplus extern "C" { diff --git a/include/grpc/support/tls_pthread.h b/include/grpc/support/tls_pthread.h index 67f169dd7d3..7c42d08bfed 100644 --- a/include/grpc/support/tls_pthread.h +++ b/include/grpc/support/tls_pthread.h @@ -49,6 +49,9 @@ struct gpr_pthread_thread_local { #define gpr_tls_init(tls) GPR_ASSERT(0 == pthread_key_create(&(tls)->key, NULL)) #define gpr_tls_destroy(tls) pthread_key_delete((tls)->key) +#ifdef __cplusplus +extern "C" +#endif gpr_intptr gpr_tls_set(struct gpr_pthread_thread_local *tls, gpr_intptr value); #define gpr_tls_get(tls) ((gpr_intptr)pthread_getspecific((tls)->key))