diff --git a/libi2pd/I2PEndian.h b/libi2pd/I2PEndian.h index d08e90cb..d2250768 100644 --- a/libi2pd/I2PEndian.h +++ b/libi2pd/I2PEndian.h @@ -3,7 +3,7 @@ #include #include -#if defined(__FreeBSD__) +#if defined(__FreeBSD__) || defined(__NetBSD__) #include #elif defined(__linux__) || defined(__FreeBSD_kernel__) || defined(__OpenBSD__) || defined(__GLIBC__) #include diff --git a/libi2pd/NTCPSession.cpp b/libi2pd/NTCPSession.cpp index a340089c..85c32743 100644 --- a/libi2pd/NTCPSession.cpp +++ b/libi2pd/NTCPSession.cpp @@ -171,7 +171,7 @@ namespace transport return; } } -#if (__GNUC__ == 4) && (__GNUC_MINOR__ <= 7) +#if ((__GNUC__ == 4) && (__GNUC_MINOR__ <= 7)) || defined(__NetBSD__) // due the bug in gcc 4.7. std::shared_future.get() is not const if (!m_DHKeysPair) m_DHKeysPair = transports.GetNextDHKeysPair (); @@ -250,7 +250,7 @@ namespace transport } else { -#if (__GNUC__ == 4) && (__GNUC_MINOR__ <= 7) +#if ((__GNUC__ == 4) && (__GNUC_MINOR__ <= 7)) || defined(__NetBSD__) // due the bug in gcc 4.7. std::shared_future.get() is not const CreateAESKey (m_Establisher->phase2.pubKey); HandlePhase2 ();