|
|
|
@ -15,7 +15,7 @@
@@ -15,7 +15,7 @@
|
|
|
|
|
#include "util.h" |
|
|
|
|
#include "Log.h" |
|
|
|
|
|
|
|
|
|
#if defined(__linux__) || defined(__FreeBSD_kernel__) || defined(__APPLE__) |
|
|
|
|
#if defined(__linux__) || defined(__FreeBSD_kernel__) || defined(__APPLE__) || defined(__OpenBSD__) |
|
|
|
|
#include <sys/types.h> |
|
|
|
|
#include <ifaddrs.h> |
|
|
|
|
#elif defined(WIN32) |
|
|
|
@ -463,7 +463,7 @@ namespace http
@@ -463,7 +463,7 @@ namespace http
|
|
|
|
|
|
|
|
|
|
namespace net { |
|
|
|
|
|
|
|
|
|
#if defined(__linux__) || defined(__FreeBSD_kernel__) || defined(__APPLE__) |
|
|
|
|
#if defined(__linux__) || defined(__FreeBSD_kernel__) || defined(__APPLE__) || defined(__OpenBSD__) |
|
|
|
|
|
|
|
|
|
int GetMTUUnix(const boost::asio::ip::address& localAddress, int fallback) |
|
|
|
|
{ |
|
|
|
@ -663,7 +663,7 @@ namespace net {
@@ -663,7 +663,7 @@ namespace net {
|
|
|
|
|
{ |
|
|
|
|
const int fallback = 576; // fallback MTU
|
|
|
|
|
|
|
|
|
|
#if defined(__linux__) || defined(__FreeBSD_kernel__) || defined(__APPLE__) |
|
|
|
|
#if defined(__linux__) || defined(__FreeBSD_kernel__) || defined(__APPLE__) || defined(__OpenBSD__) |
|
|
|
|
return GetMTUUnix(localAddress, fallback); |
|
|
|
|
#elif defined(WIN32) |
|
|
|
|
return GetMTUWindows(localAddress, fallback); |
|
|
|
|