zerotier: update to 1.6.1lilik-openwrt-22.03
@ -1,25 +1,25 @@ | |||
From a856855ab97e0775a08e1571a4ad26c264cb13f4 Mon Sep 17 00:00:00 2001 | |||
From 093ec88ff213a5713ad5d3c26ddf5ecdea3c6377 Mon Sep 17 00:00:00 2001 | |||
From: Moritz Warning <moritzwarning@web.de> | |||
Date: Sun, 4 Aug 2019 03:56:37 +0200 | |||
Subject: [PATCH 3/4] remove arm32 conservative CFLAGS | |||
Subject: [PATCH 3/8] remove arm32 conservative CFLAGS | |||
--- | |||
make-linux.mk | 2 +- | |||
1 file changed, 1 insertion(+), 1 deletion(-) | |||
diff --git a/make-linux.mk b/make-linux.mk | |||
index 13244741..fd164dfa 100644 | |||
index bd05e6b5..b1bb638e 100644 | |||
--- a/make-linux.mk | |||
+++ b/make-linux.mk | |||
@@ -262,7 +262,7 @@ ifeq ($(ZT_OFFICIAL),1) | |||
@@ -276,7 +276,7 @@ ifeq ($(ZT_CONTROLLER),1) | |||
endif | |||
# ARM32 hell -- use conservative CFLAGS | |||
-ifeq ($(ZT_ARCHITECTURE),3) | |||
+ifeq (0,3) | |||
ifeq ($(shell if [ -e /usr/bin/dpkg ]; then dpkg --print-architecture; fi),armel) | |||
override CFLAGS+=-march=armv5 -mfloat-abi=soft -msoft-float -mno-unaligned-access -marm | |||
override CXXFLAGS+=-march=armv5 -mfloat-abi=soft -msoft-float -mno-unaligned-access -marm | |||
override CFLAGS+=-march=armv5t -mfloat-abi=soft -msoft-float -mno-unaligned-access -marm | |||
override CXXFLAGS+=-march=armv5t -mfloat-abi=soft -msoft-float -mno-unaligned-access -marm | |||
-- | |||
2.22.0 | |||
2.29.2 | |||
@ -0,0 +1,29 @@ | |||
From e0c76c5ccf049d22bc47d723567926346e4d3639 Mon Sep 17 00:00:00 2001 | |||
From: Moritz Warning <moritzwarning@web.de> | |||
Date: Sat, 21 Nov 2020 18:19:21 +0100 | |||
Subject: [PATCH 6/8] gcc10 | |||
--- | |||
osdep/Binder.hpp | 6 +++--- | |||
1 file changed, 3 insertions(+), 3 deletions(-) | |||
diff --git a/osdep/Binder.hpp b/osdep/Binder.hpp | |||
index c52f303b..8a38ab04 100644 | |||
--- a/osdep/Binder.hpp | |||
+++ b/osdep/Binder.hpp | |||
@@ -396,9 +396,9 @@ public: | |||
} | |||
#endif // __LINUX__ | |||
if (_bindingCount < ZT_BINDER_MAX_BINDINGS) { | |||
- _bindings[_bindingCount].udpSock = udps; | |||
- _bindings[_bindingCount].tcpListenSock = tcps; | |||
- _bindings[_bindingCount].address = ii->first; | |||
+ _bindings[(unsigned int)_bindingCount].udpSock = udps; | |||
+ _bindings[(unsigned int)_bindingCount].tcpListenSock = tcps; | |||
+ _bindings[(unsigned int)_bindingCount].address = ii->first; | |||
phy.setIfName(udps,(char*)ii->second.c_str(),(int)ii->second.length()); | |||
++_bindingCount; | |||
} | |||
-- | |||
2.29.2 | |||
@ -0,0 +1,28 @@ | |||
From e06177a74f1e4314baf17c52f360dabcb78e69cd Mon Sep 17 00:00:00 2001 | |||
From: Moritz Warning <moritzwarning@web.de> | |||
Date: Sun, 29 Nov 2020 19:45:36 +0100 | |||
Subject: [PATCH 7/8] add cerrno header for (str)errno | |||
Fixes compilation under libcxx. | |||
Signed-off-by: Rosen Penev <rosenp@gmail.com> | |||
--- | |||
osdep/LinuxNetLink.cpp | 2 ++ | |||
1 file changed, 2 insertions(+) | |||
diff --git a/osdep/LinuxNetLink.cpp b/osdep/LinuxNetLink.cpp | |||
index 421da1f6..b7c13edf 100644 | |||
--- a/osdep/LinuxNetLink.cpp | |||
+++ b/osdep/LinuxNetLink.cpp | |||
@@ -22,6 +22,8 @@ | |||
#include <unistd.h> | |||
#include <linux/if_tun.h> | |||
+#include <cerrno> | |||
+ | |||
#ifndef IFNAMSIZ | |||
#define IFNAMSIZ 16 | |||
#endif | |||
-- | |||
2.29.2 | |||
@ -0,0 +1,28 @@ | |||
From 7ac88ced6cdedf88ccebfc1de12d92b269d4a60a Mon Sep 17 00:00:00 2001 | |||
From: Moritz Warning <moritzwarning@web.de> | |||
Date: Mon, 30 Nov 2020 12:25:42 +0100 | |||
Subject: [PATCH 8/8] fix compilation for arm_cortex-a7+neon | |||
Fixes "error: 'vrbitq_u8' was not declared in this scope" | |||
Signed-off-by: Rosen Penev <rosenp@gmail.com> | |||
--- | |||
node/Constants.hpp | 2 +- | |||
1 file changed, 1 insertion(+), 1 deletion(-) | |||
diff --git a/node/Constants.hpp b/node/Constants.hpp | |||
index 400976c1..eccc3a31 100644 | |||
--- a/node/Constants.hpp | |||
+++ b/node/Constants.hpp | |||
@@ -109,7 +109,7 @@ | |||
#include <immintrin.h> | |||
#endif | |||
-#if (defined(__ARM_NEON) || defined(__ARM_NEON__) || defined(ZT_ARCH_ARM_HAS_NEON)) | |||
+#if (defined(__aarch64__) || defined(ZT_ARCH_ARM_HAS_NEON)) | |||
#if (defined(__APPLE__) && !defined(__LP64__)) || (defined(__ANDROID__) && defined(__arm__)) | |||
#ifdef ZT_ARCH_ARM_HAS_NEON | |||
#undef ZT_ARCH_ARM_HAS_NEON | |||
-- | |||
2.29.2 | |||
@ -1,10 +0,0 @@ | |||
--- a/osdep/LinuxNetLink.hpp | |||
+++ b/osdep/LinuxNetLink.hpp | |||
@@ -18,6 +18,7 @@ | |||
#ifdef __LINUX__ | |||
+#include <cerrno> | |||
#include <vector> | |||
#include <sys/socket.h> |
@ -1,25 +0,0 @@ | |||
--- a/osdep/OSUtils.hpp | |||
+++ b/osdep/OSUtils.hpp | |||
@@ -37,9 +37,6 @@ | |||
#include <sys/time.h> | |||
#include <sys/stat.h> | |||
#include <arpa/inet.h> | |||
-#ifdef __LINUX__ | |||
-#include <sys/syscall.h> | |||
-#endif | |||
#endif | |||
#ifndef OMIT_JSON_SUPPORT | |||
@@ -211,11 +208,8 @@ public: | |||
return (int64_t)( ((tmp.QuadPart - 116444736000000000LL) / 10000L) + st.wMilliseconds ); | |||
#else | |||
struct timeval tv; | |||
-#ifdef __LINUX__ | |||
- syscall(SYS_gettimeofday,&tv,0); /* fix for musl libc broken gettimeofday bug */ | |||
-#else | |||
gettimeofday(&tv,(struct timezone *)0); | |||
-#endif | |||
+ | |||
return ( (1000LL * (int64_t)tv.tv_sec) + (int64_t)(tv.tv_usec / 1000) ); | |||
#endif | |||
}; |
@ -1,39 +0,0 @@ | |||
From cce4fa719d447c55d93458b25fa92717a2d61a60 Mon Sep 17 00:00:00 2001 | |||
From: Jonas Witschel <diabonas@archlinux.org> | |||
Date: Tue, 14 Jul 2020 14:20:16 +0200 | |||
Subject: [PATCH] Fix compilation with GCC 10 by providing explicit cast of | |||
_bindingCount | |||
MIME-Version: 1.0 | |||
Content-Type: text/plain; charset=UTF-8 | |||
Content-Transfer-Encoding: 8bit | |||
Compilation with GCC 10 fails with the following error: | |||
service/../osdep/Binder.hpp: In member function ‘void ZeroTier::Binder::refresh(ZeroTier::Phy<PHY_HANDLER_TYPE>&, unsigned int*, unsigned int, std::vector<ZeroTier::InetAddress>, INTERFACE_CHECKER&)’: | |||
service/../osdep/Binder.hpp:376:30: internal compiler error: unexpected expression ‘(std::__atomic_base<unsigned int>::__int_type)((ZeroTier::Binder*)this)->ZeroTier::Binder::_bindingCount’ of kind implicit_conv_expr | |||
376 | _bindings[_bindingCount].udpSock = udps; | |||
| ^ | |||
Help the compiler by providing an explicit cast to the appropriate type like it | |||
is already done in l. 338 of the same file. | |||
--- | |||
osdep/Binder.hpp | 6 +++--- | |||
1 file changed, 3 insertions(+), 3 deletions(-) | |||
diff --git a/osdep/Binder.hpp b/osdep/Binder.hpp | |||
index 660e6f0c..a5bc85c9 100644 | |||
--- a/osdep/Binder.hpp | |||
+++ b/osdep/Binder.hpp | |||
@@ -373,9 +373,9 @@ class Binder | |||
} | |||
#endif // __LINUX__ | |||
if (_bindingCount < ZT_BINDER_MAX_BINDINGS) { | |||
- _bindings[_bindingCount].udpSock = udps; | |||
- _bindings[_bindingCount].tcpListenSock = tcps; | |||
- _bindings[_bindingCount].address = ii->first; | |||
+ _bindings[(unsigned int)_bindingCount].udpSock = udps; | |||
+ _bindings[(unsigned int)_bindingCount].tcpListenSock = tcps; | |||
+ _bindings[(unsigned int)_bindingCount].address = ii->first; | |||
phy.setIfName(udps,(char*)ii->second.c_str(),(int)ii->second.length()); | |||
++_bindingCount; | |||
} |