diff --git a/include/llarp/ip.hpp b/include/llarp/ip.hpp index cee2a1708..fa019d1a2 100644 --- a/include/llarp/ip.hpp +++ b/include/llarp/ip.hpp @@ -3,6 +3,7 @@ #include #include #include + #ifndef _WIN32 #include // FreeBSD needs this for uchar for ip.h #include @@ -42,8 +43,10 @@ typedef struct ip_hdr #define ihl ip_header_len #define ip_version version #endif + #include -#if !defined(__linux__) && !defined(_WIN32) + +#if !defined(__linux__) && !defined(_WIN32) && !defined(__APPLE__) #define iphdr ip #define saddr ip_src.s_addr #define daddr ip_dst.s_addr @@ -51,6 +54,7 @@ typedef struct ip_hdr #define check ip_sum #define ihl ip_hl #endif + struct ip_header { #if __BYTE_ORDER == __LITTLE_ENDIAN @@ -61,6 +65,10 @@ struct ip_header unsigned int ihl:4; #else # error "Please fix " +#endif + +#if defined(__linux__) +#define ip_version version #endif uint8_t tos; uint16_t tot_len; diff --git a/llarp/router.cpp b/llarp/router.cpp index 5acb85d0c..3c19b1520 100644 --- a/llarp/router.cpp +++ b/llarp/router.cpp @@ -251,7 +251,7 @@ llarp_router::try_connect(fs::path rcfile) } } else - llarp::LogError("failed to verify signature of RC", rcfile); + llarp::LogError("failed to verify signature of RC ", rcfile); } bool diff --git a/llarp/service/endpoint.cpp b/llarp/service/endpoint.cpp index 0397e0e10..9c0b58f4b 100644 --- a/llarp/service/endpoint.cpp +++ b/llarp/service/endpoint.cpp @@ -1189,10 +1189,14 @@ namespace llarp ShiftIntroduction(); } m_Endpoint->EnsureRouterIsKnown(remoteIntro.router); + // FIXME: LLVM 3.8 can't hang + llarp::LogError("FIXME llvm 3.8"); + /* std::remove_if(m_BadIntros.cbegin(), m_BadIntros.cend(), [now](const Introduction& intro) -> bool { return intro.IsExpired(now); }); + */ // TODO: check for expiration of outbound context return false; }