mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-04-27 11:17:49 +02:00
backport openbsd support
This commit is contained in:
parent
5d43052c05
commit
d01a21a867
3 changed files with 5 additions and 3 deletions
4
util.cpp
4
util.cpp
|
@ -16,7 +16,7 @@
|
|||
#include "util.h"
|
||||
#include "Log.h"
|
||||
|
||||
#if defined(__linux__) || defined(__FreeBSD_kernel__)
|
||||
#if defined(__linux__) || defined(__FreeBSD_kernel__) || defined(__APPLE__) || defined(__OpenBSD__)
|
||||
#include <sys/types.h>
|
||||
#include <ifaddrs.h>
|
||||
#elif defined(WIN32)
|
||||
|
@ -508,7 +508,7 @@ namespace net
|
|||
{
|
||||
int GetMTU (const boost::asio::ip::address& localAddress)
|
||||
{
|
||||
#if defined(__linux__) || defined(__FreeBSD_kernel__)
|
||||
#if defined(__linux__) || defined(__FreeBSD_kernel__) || defined(__APPLE__) || defined(__OpenBSD__)
|
||||
ifaddrs * ifaddr, * ifa = nullptr;
|
||||
if (getifaddrs(&ifaddr) == -1)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue