Skip to content

Commit

Permalink
update to zerotier 1.1.14
Browse files Browse the repository at this point in the history
  • Loading branch information
mwarning committed Jul 29, 2016
1 parent 0c47eb0 commit 40ede79
Show file tree
Hide file tree
Showing 3 changed files with 52 additions and 22 deletions.
4 changes: 2 additions & 2 deletions zerotier/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
From 830250759cd4c14ca2ae5ddf24f0a0427f258622 Mon Sep 17 00:00:00 2001
From: Adam Ierymenko <[email protected]>
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<C>,instance))
+ if (pthread_create(&t._tid,&t._tattr,&___zt_threadMain<C>,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

Original file line number Diff line number Diff line change
@@ -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 <[email protected]>
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
Expand Down Expand Up @@ -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 <unistd.h>
#include <sys/param.h>
-#include <sys/sysctl.h>
+//#include <sys/sysctl.h>
#include <sys/socket.h>
#include <sys/types.h>
#include <sys/wait.h>
--
2.9.0

0 comments on commit 40ede79

Please sign in to comment.