Browse Source

Merge pull request #1116 from majestrate/netbsd

NetBSD support
pull/1119/head
orignal 7 years ago committed by GitHub
parent
commit
30fb0f5a94
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      libi2pd/I2PEndian.h
  2. 4
      libi2pd/NTCPSession.cpp

2
libi2pd/I2PEndian.h

@ -3,7 +3,7 @@
#include <inttypes.h> #include <inttypes.h>
#include <string.h> #include <string.h>
#if defined(__FreeBSD__) #if defined(__FreeBSD__) || defined(__NetBSD__)
#include <sys/endian.h> #include <sys/endian.h>
#elif defined(__linux__) || defined(__FreeBSD_kernel__) || defined(__OpenBSD__) || defined(__GLIBC__) #elif defined(__linux__) || defined(__FreeBSD_kernel__) || defined(__OpenBSD__) || defined(__GLIBC__)
#include <endian.h> #include <endian.h>

4
libi2pd/NTCPSession.cpp

@ -171,7 +171,7 @@ namespace transport
return; 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 // due the bug in gcc 4.7. std::shared_future.get() is not const
if (!m_DHKeysPair) if (!m_DHKeysPair)
m_DHKeysPair = transports.GetNextDHKeysPair (); m_DHKeysPair = transports.GetNextDHKeysPair ();
@ -250,7 +250,7 @@ namespace transport
} }
else 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 // due the bug in gcc 4.7. std::shared_future.get() is not const
CreateAESKey (m_Establisher->phase2.pubKey); CreateAESKey (m_Establisher->phase2.pubKey);
HandlePhase2 (); HandlePhase2 ();

Loading…
Cancel
Save