diff --git a/test/core/util/port.h b/test/core/util/port.h index d06f04731e2..0ba895af433 100644 --- a/test/core/util/port.h +++ b/test/core/util/port.h @@ -34,6 +34,10 @@ #ifndef __GRPC_TEST_UTIL_PORT_H__ #define __GRPC_TEST_UTIL_PORT_H__ +#ifdef __cplusplus +extern "C" { +#endif + /* pick a port number that is currently unused by either tcp or udp. return 0 on failure. */ int grpc_pick_unused_port(); @@ -41,4 +45,8 @@ int grpc_pick_unused_port(); on failure. */ int grpc_pick_unused_port_or_die(); +#ifdef __cplusplus +} +#endif + #endif /* __GRPC_TEST_UTIL_PORT_H__ */