diff options
-rw-r--r-- | include/inet_common.h | 2 | ||||
-rw-r--r-- | include/libbb.h | 1 | ||||
-rw-r--r-- | include/platform.h | 8 |
3 files changed, 9 insertions, 2 deletions
diff --git a/include/inet_common.h b/include/inet_common.h index f330aa9..aa883ed 100644 --- a/include/inet_common.h +++ b/include/inet_common.h @@ -11,7 +11,7 @@ #include <features.h> #include <sys/types.h> #include <sys/socket.h> -#include <netinet/in.h> +#include "platform.h" extern const char bb_INET_default[]; /* = "default" */ diff --git a/include/libbb.h b/include/libbb.h index 0490ee3..bc3fa59 100644 --- a/include/libbb.h +++ b/include/libbb.h @@ -20,7 +20,6 @@ #include <stdint.h> #include <netdb.h> -#include <netinet/in.h> #include <features.h> diff --git a/include/platform.h b/include/platform.h index 3f4bedb..a199169 100644 --- a/include/platform.h +++ b/include/platform.h @@ -92,8 +92,16 @@ #define BB_BIG_ENDIAN 0 #endif +/* ---- Networking ------------------------------------------ */ +#ifndef __APPLE__ +#include <arpa/inet.h> +#else +#include <netinet/in.h> +#endif + /* ---- miscellaneous --------------------------------------- */ /* NLS stuff */ +/* THIS SHOULD BE CLEANED OUT OF THE TREE ENTIRELY */ #define _(Text) Text #define N_(Text) (Text) |