From 40ede793b2aaab164697fd56681b64543fa5c900 Mon Sep 17 00:00:00 2001 From: Moritz Warning Date: Fri, 29 Jul 2016 22:04:41 +0200 Subject: [PATCH] update to zerotier 1.1.14 --- zerotier/Makefile | 4 +- ...ng-under-MUSL-libc-e.g.-Alpine-Linux.patch | 44 +++++++++++++++++++ ...r-fix-build.patch => 0002-fix-build.patch} | 26 +++-------- 3 files changed, 52 insertions(+), 22 deletions(-) create mode 100644 zerotier/patches/0001-Fix-for-running-under-MUSL-libc-e.g.-Alpine-Linux.patch rename zerotier/patches/{0001-zerotier-fix-build.patch => 0002-fix-build.patch} (64%) diff --git a/zerotier/Makefile b/zerotier/Makefile index 9b6a900..19ef76d 100644 --- a/zerotier/Makefile +++ b/zerotier/Makefile @@ -8,8 +8,8 @@ include $(TOPDIR)/rules.mk PKG_NAME:=zerotier -PKG_VERSION:=1.1.12 -PKG_REV:=bdc3b0834bb8abc621ee6dbc9a92769b57376bee +PKG_VERSION:=1.1.14 +PKG_REV:=ae491c277e6f35d1acbdcbf700e2b834957295ae PKG_RELEASE:=1 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 diff --git a/zerotier/patches/0001-Fix-for-running-under-MUSL-libc-e.g.-Alpine-Linux.patch b/zerotier/patches/0001-Fix-for-running-under-MUSL-libc-e.g.-Alpine-Linux.patch new file mode 100644 index 0000000..119491f --- /dev/null +++ b/zerotier/patches/0001-Fix-for-running-under-MUSL-libc-e.g.-Alpine-Linux.patch @@ -0,0 +1,44 @@ +From 830250759cd4c14ca2ae5ddf24f0a0427f258622 Mon Sep 17 00:00:00 2001 +From: Adam Ierymenko +Date: Tue, 26 Jul 2016 16:36:20 -0700 +Subject: [PATCH 1/2] Fix for running under MUSL libc (e.g. Alpine Linux) + +--- + osdep/Thread.hpp | 7 ++++++- + 1 file changed, 6 insertions(+), 1 deletion(-) + +diff --git a/osdep/Thread.hpp b/osdep/Thread.hpp +index 7fb38d8..4f90dc0 100644 +--- a/osdep/Thread.hpp ++++ b/osdep/Thread.hpp +@@ -125,6 +125,10 @@ public: + throw() + { + memset(&_tid,0,sizeof(_tid)); ++ pthread_attr_init(&_tattr); ++#ifdef __LINUX__ ++ pthread_attr_setstacksize(&_tattr,8388608); // for MUSL libc and others, has no effect in normal glibc environments ++#endif + _started = false; + } + +@@ -157,7 +161,7 @@ public: + { + Thread t; + t._started = true; +- if (pthread_create(&t._tid,(const pthread_attr_t *)0,&___zt_threadMain,instance)) ++ if (pthread_create(&t._tid,&t._tattr,&___zt_threadMain,instance)) + throw std::runtime_error("pthread_create() failed, unable to create thread"); + return t; + } +@@ -184,6 +188,7 @@ public: + + private: + pthread_t _tid; ++ pthread_attr_t _tattr; + volatile bool _started; + }; + +-- +2.9.0 + diff --git a/zerotier/patches/0001-zerotier-fix-build.patch b/zerotier/patches/0002-fix-build.patch similarity index 64% rename from zerotier/patches/0001-zerotier-fix-build.patch rename to zerotier/patches/0002-fix-build.patch index d7c4e4f..4c948b6 100644 --- a/zerotier/patches/0001-zerotier-fix-build.patch +++ b/zerotier/patches/0002-fix-build.patch @@ -1,15 +1,14 @@ -From f05a574e36c110ddab5912ea7f06f7c41a1c18dd Mon Sep 17 00:00:00 2001 +From 333bbabc6dfad0553fb63d560ab6442a50cc9e52 Mon Sep 17 00:00:00 2001 From: Moritz Warning -Date: Sat, 9 Jul 2016 17:45:14 +0200 -Subject: [PATCH 1/1] zerotier: fix build +Date: Fri, 22 Jul 2016 23:27:31 +0200 +Subject: [PATCH 2/2] fix build --- - make-linux.mk | 30 +++++++++++++++--------------- - osdep/ManagedRoute.cpp | 2 +- - 2 files changed, 16 insertions(+), 16 deletions(-) + make-linux.mk | 30 +++++++++++++++--------------- + 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/make-linux.mk b/make-linux.mk -index 13b1547..ed944ff 100644 +index acc22a6..819e95f 100644 --- a/make-linux.mk +++ b/make-linux.mk @@ -39,24 +39,24 @@ include objects.mk @@ -52,19 +51,6 @@ index 13b1547..ed944ff 100644 ifeq ($(ZT_USE_MINIUPNPC),1) OBJS+=osdep/PortMapper.o -diff --git a/osdep/ManagedRoute.cpp b/osdep/ManagedRoute.cpp -index 5499012..0fdc846 100644 ---- a/osdep/ManagedRoute.cpp -+++ b/osdep/ManagedRoute.cpp -@@ -33,7 +33,7 @@ - #ifdef __UNIX_LIKE__ - #include - #include --#include -+//#include - #include - #include - #include -- 2.9.0