From e3468ef6007f1737c671a024422d53d72e7c3844 Mon Sep 17 00:00:00 2001 From: Adrien Destugues Date: Thu, 26 Feb 2015 22:02:37 +0100 Subject: [PATCH] ifaddrs: add extern "C" We need this to be callable from C programs. Thanks to Diver for reporting! --- headers/compatibility/bsd/ifaddrs.h | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/headers/compatibility/bsd/ifaddrs.h b/headers/compatibility/bsd/ifaddrs.h index 7169d0cf5d..e02be83964 100644 --- a/headers/compatibility/bsd/ifaddrs.h +++ b/headers/compatibility/bsd/ifaddrs.h @@ -6,6 +6,11 @@ #define _IFADDRS_H +#ifdef __cplusplus +extern "C" { +#endif + + struct ifaddrs { struct ifaddrs *ifa_next; /* Next item in list */ const char *ifa_name; /* Name of interface */ @@ -22,4 +27,9 @@ int getifaddrs(struct ifaddrs **ifap); void freeifaddrs(struct ifaddrs *ifa); +#ifdef __cplusplus +} +#endif + + #endif