default features: make musl usable without feature test macros
[musl] / include / net / if.h
index 2ae5f89..5813976 100644 (file)
@@ -1,6 +1,12 @@
 #ifndef _NET_IF_H
 #define _NET_IF_H
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include <features.h>
+
 #define IF_NAMESIZE 16
 
 struct if_nameindex
@@ -17,7 +23,7 @@ void if_freenameindex (struct if_nameindex *);
 
 
 
-#ifdef _GNU_SOURCE
+#if defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
 
 #include <sys/socket.h>
 
@@ -117,6 +123,8 @@ struct ifconf {
 
 #endif
 
-
+#ifdef __cplusplus
+}
+#endif
 
 #endif