ifaddrs: add extern "C"
We need this to be callable from C programs. Thanks to Diver for reporting!
This commit is contained in:
@@ -6,6 +6,11 @@
|
|||||||
#define _IFADDRS_H
|
#define _IFADDRS_H
|
||||||
|
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
struct ifaddrs {
|
struct ifaddrs {
|
||||||
struct ifaddrs *ifa_next; /* Next item in list */
|
struct ifaddrs *ifa_next; /* Next item in list */
|
||||||
const char *ifa_name; /* Name of interface */
|
const char *ifa_name; /* Name of interface */
|
||||||
@@ -22,4 +27,9 @@ int getifaddrs(struct ifaddrs **ifap);
|
|||||||
void freeifaddrs(struct ifaddrs *ifa);
|
void freeifaddrs(struct ifaddrs *ifa);
|
||||||
|
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
Reference in New Issue
Block a user