From 6b67cb0e2a2b9a28d57845b0a7ffd637e899a505 Mon Sep 17 00:00:00 2001 From: Adam Ierymenko Date: Mon, 16 Nov 2020 11:11:52 -0800 Subject: [PATCH] Linux build fixes. --- osdep/LinuxEthernetTap.cpp | 4 ++++ osdep/LinuxNetLink.cpp | 4 ++++ osdep/LinuxNetLink.hpp | 4 ++-- 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/osdep/LinuxEthernetTap.cpp b/osdep/LinuxEthernetTap.cpp index 275443bd..4abc54b9 100644 --- a/osdep/LinuxEthernetTap.cpp +++ b/osdep/LinuxEthernetTap.cpp @@ -48,6 +48,10 @@ #include #include +#ifndef IFNAMSIZ +#define IFNAMSIZ 16 +#endif + // ff:ff:ff:ff:ff:ff with no ADI static const ZeroTier::MulticastGroup _blindWildcardMulticastGroup(ZeroTier::MAC(0xff),0); diff --git a/osdep/LinuxNetLink.cpp b/osdep/LinuxNetLink.cpp index 8ee47727..421da1f6 100644 --- a/osdep/LinuxNetLink.cpp +++ b/osdep/LinuxNetLink.cpp @@ -22,6 +22,10 @@ #include #include +#ifndef IFNAMSIZ +#define IFNAMSIZ 16 +#endif + namespace ZeroTier { struct nl_route_req { diff --git a/osdep/LinuxNetLink.hpp b/osdep/LinuxNetLink.hpp index c5e08c23..22222e46 100644 --- a/osdep/LinuxNetLink.hpp +++ b/osdep/LinuxNetLink.hpp @@ -26,7 +26,7 @@ #include #include #include -#include +//#include #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;