From 4988a32d3359b1be7fcb355dc53686a2540a250f Mon Sep 17 00:00:00 2001 From: Jeff Becker Date: Fri, 16 Feb 2018 18:26:57 -0500 Subject: [PATCH 1/2] make endian work with netbsd --- libi2pd/I2PEndian.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libi2pd/I2PEndian.h b/libi2pd/I2PEndian.h index e5271233..a8cfd0a2 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__) #include From b02464990b964df6893877546e7aa475f5a83045 Mon Sep 17 00:00:00 2001 From: Jeff Becker Date: Fri, 16 Feb 2018 18:54:34 -0500 Subject: [PATCH 2/2] work around netbsd quarkyness --- libi2pd/NTCPSession.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 ();