From 5d0a5cfe72a80bf92eb1b8034096dee8f312800e Mon Sep 17 00:00:00 2001
From: Deomid Ryabkov <rojer@cesanta.com>
Date: Sun, 15 May 2016 19:36:52 +0200
Subject: [PATCH] Add CPP guards to net_if.h

cesanta/mongoose#653

PUBLISHED_FROM=a676dbce6d04b78ca316a4601e9cbb676ecc88d2
---
 mongoose.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/mongoose.h b/mongoose.h
index 2843f7eec..0ca451dda 100644
--- a/mongoose.h
+++ b/mongoose.h
@@ -1669,6 +1669,10 @@ double mg_time();
  * Implementation must ensure that only one callback is invoked at any time.
  */
 
+#ifdef __cplusplus
+extern "C" {
+#endif /* __cplusplus */
+
 /* Request that a TCP connection is made to the specified address. */
 void mg_if_connect_tcp(struct mg_connection *nc,
                        const union socket_address *sa);
@@ -1730,6 +1734,10 @@ void mg_if_get_conn_addr(struct mg_connection *nc, int remote,
 /* Associate a socket to a connection. */
 void mg_sock_set(struct mg_connection *nc, sock_t sock);
 
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+
 #endif /* CS_MONGOOSE_SRC_NET_IF_H_ */
 /*
  * Copyright (c) 2014 Cesanta Software Limited
-- 
GitLab