aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/lib
diff options
context:
space:
mode:
authorGravatar Yash Tibrewal <yashkt@google.com>2017-09-22 15:27:14 -0700
committerGravatar Yash Tibrewal <yashkt@google.com>2017-10-02 16:29:41 -0700
commite2ae17221ea10065297b32911ac3166a95c4338e (patch)
tree0d7166c39999f62a7988ce7c9ec99ab8bdace6d0 /src/core/lib
parent662d32444e7cad07d2026ddcbe5c659a6fa1a3bd (diff)
Some more extern C
Diffstat (limited to 'src/core/lib')
-rw-r--r--src/core/lib/iomgr/gethostname.h9
-rw-r--r--src/core/lib/iomgr/gethostname_fallback.cc1
-rw-r--r--src/core/lib/iomgr/gethostname_host_name_max.cc1
-rw-r--r--src/core/lib/iomgr/gethostname_sysconf.cc1
4 files changed, 12 insertions, 0 deletions
diff --git a/src/core/lib/iomgr/gethostname.h b/src/core/lib/iomgr/gethostname.h
index 9c6b9d8d42..c0a4c7e6df 100644
--- a/src/core/lib/iomgr/gethostname.h
+++ b/src/core/lib/iomgr/gethostname.h
@@ -19,8 +19,17 @@
#ifndef GRPC_CORE_LIB_IOMGR_GETHOSTNAME_H
#define GRPC_CORE_LIB_IOMGR_GETHOSTNAME_H
+#ifdef __cplusplus
+extern "C" {
+#endif
+
// Returns the hostname of the local machine.
// Caller takes ownership of result.
char *grpc_gethostname();
+#ifdef __cplusplus
+}
+#endif
+
+
#endif /* GRPC_CORE_LIB_IOMGR_GETHOSTNAME_H */
diff --git a/src/core/lib/iomgr/gethostname_fallback.cc b/src/core/lib/iomgr/gethostname_fallback.cc
index 6229461568..31dff5812c 100644
--- a/src/core/lib/iomgr/gethostname_fallback.cc
+++ b/src/core/lib/iomgr/gethostname_fallback.cc
@@ -17,6 +17,7 @@
*/
#include "src/core/lib/iomgr/port.h"
+#include "src/core/lib/iomgr/gethostname.h"
#ifdef GRPC_GETHOSTNAME_FALLBACK
diff --git a/src/core/lib/iomgr/gethostname_host_name_max.cc b/src/core/lib/iomgr/gethostname_host_name_max.cc
index 4d0511412e..9be319dab8 100644
--- a/src/core/lib/iomgr/gethostname_host_name_max.cc
+++ b/src/core/lib/iomgr/gethostname_host_name_max.cc
@@ -17,6 +17,7 @@
*/
#include "src/core/lib/iomgr/port.h"
+#include "src/core/lib/iomgr/gethostname.h"
#ifdef GRPC_POSIX_HOST_NAME_MAX
diff --git a/src/core/lib/iomgr/gethostname_sysconf.cc b/src/core/lib/iomgr/gethostname_sysconf.cc
index 51bac5d69d..4cc7ebf4c0 100644
--- a/src/core/lib/iomgr/gethostname_sysconf.cc
+++ b/src/core/lib/iomgr/gethostname_sysconf.cc
@@ -17,6 +17,7 @@
*/
#include "src/core/lib/iomgr/port.h"
+#include "src/core/lib/iomgr/gethostname.h"
#ifdef GRPC_POSIX_SYSCONF