diff --git a/include/opendht/infohash.h b/include/opendht/infohash.h index d1df7698..e0964830 100644 --- a/include/opendht/infohash.h +++ b/include/opendht/infohash.h @@ -22,16 +22,11 @@ #include #ifndef _WIN32 -#include -#include -#ifdef __ANDROID__ -typedef uint16_t in_port_t; -#endif +#include #else #include #include -typedef uint16_t sa_family_t; -typedef uint16_t in_port_t; +#include #endif #include diff --git a/include/opendht/utils.h b/include/opendht/utils.h index ae634d9a..ef6de45d 100644 --- a/include/opendht/utils.h +++ b/include/opendht/utils.h @@ -26,9 +26,16 @@ #ifndef _WIN32 #include +#include +#include +#ifdef __ANDROID__ +typedef uint16_t in_port_t; +#endif #else -#include #include +#include +typedef uint16_t sa_family_t; +typedef uint16_t in_port_t; #endif #include