diff --git a/headers/posix/arpa/inet.h b/headers/posix/arpa/inet.h index ab1a9eef93..e4dbeaa569 100644 --- a/headers/posix/arpa/inet.h +++ b/headers/posix/arpa/inet.h @@ -10,6 +10,10 @@ #include #include /* htonl, htons, ntohl, ntohs */ +#ifdef __cplusplus +extern "C" { +#endif + in_addr_t inet_addr (const char *); int inet_aton (const char *, struct in_addr *); in_addr_t inet_lnaof (struct in_addr); @@ -25,4 +29,8 @@ const char *inet_ntop (int, const void *, char *, size_t); u_int inet_nsap_addr (const char *, u_char *, int); char *inet_nsap_ntoa (int, const u_char *, char *); +#ifdef __cplusplus +} +#endif + #endif /* _INET_H */ diff --git a/headers/posix/arpa/nameser.h b/headers/posix/arpa/nameser.h index fbec406982..35406d0fc1 100644 --- a/headers/posix/arpa/nameser.h +++ b/headers/posix/arpa/nameser.h @@ -89,6 +89,10 @@ #include #include +#ifdef __cplusplus +extern "C" { +#endif + /* * revision information. this is the release date in YYYYMMDD format. * it can change every day so the right thing to do with it is use it @@ -359,4 +363,8 @@ extern uint32 _getlong (const u_char *); (cp) += INT32SZ; \ } +#ifdef __cplusplus +} +#endif + #endif /* !_NAMESER_H_ */ diff --git a/headers/posix/net/if.h b/headers/posix/net/if.h index f9d40be25b..c7d3d94b33 100644 --- a/headers/posix/net/if.h +++ b/headers/posix/net/if.h @@ -6,16 +6,16 @@ #define _NET_IF_H #include -//#include +#include #include #include #include #include -/* XXX - hack to get this file building - * taken from be/drivers/Drivers.h - */ -#define B_DEVICE_OP_CODES_END 9999 +#ifdef __cplusplus +extern "C" { +#endif + enum { IF_GETADDR = B_DEVICE_OP_CODES_END, IF_INIT, @@ -273,5 +273,9 @@ struct ifa_msghdr { void if_init(void); #endif +#ifdef __cplusplus +} +#endif + #endif /* _NET_IF_H */ diff --git a/headers/posix/net/if_dl.h b/headers/posix/net/if_dl.h index 23b56b20f0..4b22d66321 100644 --- a/headers/posix/net/if_dl.h +++ b/headers/posix/net/if_dl.h @@ -5,7 +5,11 @@ #ifndef OBOS_IF_DL_H #define OBOS_IF_DL_H -#include "net/if.h" +#include + +#ifdef __cplusplus +extern "C" { +#endif /* link level sockaddr structure */ struct sockaddr_dl { @@ -26,5 +30,9 @@ struct sockaddr_dl { void link_addr (const char *, struct sockaddr_dl *); char *link_ntoa (const struct sockaddr_dl *); +#ifdef __cplusplus +} +#endif + #endif /* OBOS_IF_DL_H */