mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-03-13 04:46:38 +01:00
commit
6de4ea2dce
1 changed files with 4 additions and 3 deletions
|
@ -15,7 +15,7 @@
|
||||||
#include "util.h"
|
#include "util.h"
|
||||||
#include "Log.h"
|
#include "Log.h"
|
||||||
|
|
||||||
#if defined(__linux__) || defined(__FreeBSD_kernel__)
|
#if defined(__linux__) || defined(__FreeBSD_kernel__) || defined(__APPLE__)
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#include <ifaddrs.h>
|
#include <ifaddrs.h>
|
||||||
#elif defined(WIN32)
|
#elif defined(WIN32)
|
||||||
|
@ -455,7 +455,7 @@ namespace http
|
||||||
|
|
||||||
namespace net {
|
namespace net {
|
||||||
|
|
||||||
#if defined(__linux__) || defined(__FreeBSD_kernel__)
|
#if defined(__linux__) || defined(__FreeBSD_kernel__) || defined(__APPLE__)
|
||||||
|
|
||||||
int GetMTUUnix(const boost::asio::ip::address& localAddress, int fallback)
|
int GetMTUUnix(const boost::asio::ip::address& localAddress, int fallback)
|
||||||
{
|
{
|
||||||
|
@ -655,11 +655,12 @@ namespace net {
|
||||||
{
|
{
|
||||||
const int fallback = 576; // fallback MTU
|
const int fallback = 576; // fallback MTU
|
||||||
|
|
||||||
#if defined(__linux__) || defined(__FreeBSD_kernel__)
|
#if defined(__linux__) || defined(__FreeBSD_kernel__) || defined(__APPLE__)
|
||||||
return GetMTUUnix(localAddress, fallback);
|
return GetMTUUnix(localAddress, fallback);
|
||||||
#elif defined(WIN32)
|
#elif defined(WIN32)
|
||||||
return GetMTUWindows(localAddress, fallback);
|
return GetMTUWindows(localAddress, fallback);
|
||||||
#endif
|
#endif
|
||||||
|
return fallback;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue