Linux build fixes.

This commit is contained in:
Adam Ierymenko 2020-11-16 11:11:52 -08:00
parent 250f0ef9db
commit 6b67cb0e2a
3 changed files with 10 additions and 2 deletions

View File

@ -48,6 +48,10 @@
#include <utility>
#include <string>
#ifndef IFNAMSIZ
#define IFNAMSIZ 16
#endif
// ff:ff:ff:ff:ff:ff with no ADI
static const ZeroTier::MulticastGroup _blindWildcardMulticastGroup(ZeroTier::MAC(0xff),0);

View File

@ -22,6 +22,10 @@
#include <unistd.h>
#include <linux/if_tun.h>
#ifndef IFNAMSIZ
#define IFNAMSIZ 16
#endif
namespace ZeroTier {
struct nl_route_req {

View File

@ -26,7 +26,7 @@
#include <asm/types.h>
#include <linux/rtnetlink.h>
#include <sys/socket.h>
#include <linux/if.h>
//#include <linux/if.h>
#include "../node/InetAddress.hpp"
#include "../node/MAC.hpp"
@ -132,7 +132,7 @@ private:
iface_entry()
{ memset(this,0,sizeof(iface_entry)); }
int index;
char ifacename[IFNAMSIZ];
char ifacename[16]; // IFNAMSIZ on Linux == 16
char mac[18];
char mac_bin[6];
unsigned int mtu;