From 1b18f10bee2b00a46b9e92f62c200458f7abce98 Mon Sep 17 00:00:00 2001 From: Anthony Merlino Date: Sat, 27 Oct 2018 18:13:02 +0000 Subject: [PATCH] Merged in antmerlino/nuttx/net-if-externC-fix (pull request #740) Adds extern "C" guard in include/net/if.h Approved-by: GregoryN --- include/net/if.h | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/include/net/if.h b/include/net/if.h index 1909a72951e..93d03b12747 100644 --- a/include/net/if.h +++ b/include/net/if.h @@ -247,6 +247,14 @@ struct ifconf * Public Function Prototypes *******************************************************************************************/ +#ifdef __cplusplus +#define EXTERN extern "C" +extern "C" +{ +#else +#define EXTERN extern +#endif + /******************************************************************************************* * Name: if_nametoindex * @@ -282,4 +290,9 @@ unsigned int if_nametoindex(FAR const char *ifname); FAR char *if_indextoname(unsigned int ifindex, FAR char *ifname); +#undef EXTERN +#ifdef __cplusplus +} +#endif + #endif /* __INCLUDE_NET_IF_H */