Skip to content

Commit 40ede79

Browse files
committed
update to zerotier 1.1.14
1 parent 0c47eb0 commit 40ede79

File tree

3 files changed

+52
-22
lines changed

3 files changed

+52
-22
lines changed

zerotier/Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@
88
include $(TOPDIR)/rules.mk
99

1010
PKG_NAME:=zerotier
11-
PKG_VERSION:=1.1.12
12-
PKG_REV:=bdc3b0834bb8abc621ee6dbc9a92769b57376bee
11+
PKG_VERSION:=1.1.14
12+
PKG_REV:=ae491c277e6f35d1acbdcbf700e2b834957295ae
1313
PKG_RELEASE:=1
1414

1515
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
From 830250759cd4c14ca2ae5ddf24f0a0427f258622 Mon Sep 17 00:00:00 2001
2+
From: Adam Ierymenko <adam.ierymenko@gmail.com>
3+
Date: Tue, 26 Jul 2016 16:36:20 -0700
4+
Subject: [PATCH 1/2] Fix for running under MUSL libc (e.g. Alpine Linux)
5+
6+
---
7+
osdep/Thread.hpp | 7 ++++++-
8+
1 file changed, 6 insertions(+), 1 deletion(-)
9+
10+
diff --git a/osdep/Thread.hpp b/osdep/Thread.hpp
11+
index 7fb38d8..4f90dc0 100644
12+
--- a/osdep/Thread.hpp
13+
+++ b/osdep/Thread.hpp
14+
@@ -125,6 +125,10 @@ public:
15+
throw()
16+
{
17+
memset(&_tid,0,sizeof(_tid));
18+
+ pthread_attr_init(&_tattr);
19+
+#ifdef __LINUX__
20+
+ pthread_attr_setstacksize(&_tattr,8388608); // for MUSL libc and others, has no effect in normal glibc environments
21+
+#endif
22+
_started = false;
23+
}
24+
25+
@@ -157,7 +161,7 @@ public:
26+
{
27+
Thread t;
28+
t._started = true;
29+
- if (pthread_create(&t._tid,(const pthread_attr_t *)0,&___zt_threadMain<C>,instance))
30+
+ if (pthread_create(&t._tid,&t._tattr,&___zt_threadMain<C>,instance))
31+
throw std::runtime_error("pthread_create() failed, unable to create thread");
32+
return t;
33+
}
34+
@@ -184,6 +188,7 @@ public:
35+
36+
private:
37+
pthread_t _tid;
38+
+ pthread_attr_t _tattr;
39+
volatile bool _started;
40+
};
41+
42+
--
43+
2.9.0
44+

zerotier/patches/0001-zerotier-fix-build.patch renamed to zerotier/patches/0002-fix-build.patch

Lines changed: 6 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,14 @@
1-
From f05a574e36c110ddab5912ea7f06f7c41a1c18dd Mon Sep 17 00:00:00 2001
1+
From 333bbabc6dfad0553fb63d560ab6442a50cc9e52 Mon Sep 17 00:00:00 2001
22
From: Moritz Warning <moritzwarning@web.de>
3-
Date: Sat, 9 Jul 2016 17:45:14 +0200
4-
Subject: [PATCH 1/1] zerotier: fix build
3+
Date: Fri, 22 Jul 2016 23:27:31 +0200
4+
Subject: [PATCH 2/2] fix build
55

66
---
7-
make-linux.mk | 30 +++++++++++++++---------------
8-
osdep/ManagedRoute.cpp | 2 +-
9-
2 files changed, 16 insertions(+), 16 deletions(-)
7+
make-linux.mk | 30 +++++++++++++++---------------
8+
1 file changed, 15 insertions(+), 15 deletions(-)
109

1110
diff --git a/make-linux.mk b/make-linux.mk
12-
index 13b1547..ed944ff 100644
11+
index acc22a6..819e95f 100644
1312
--- a/make-linux.mk
1413
+++ b/make-linux.mk
1514
@@ -39,24 +39,24 @@ include objects.mk
@@ -52,19 +51,6 @@ index 13b1547..ed944ff 100644
5251

5352
ifeq ($(ZT_USE_MINIUPNPC),1)
5453
OBJS+=osdep/PortMapper.o
55-
diff --git a/osdep/ManagedRoute.cpp b/osdep/ManagedRoute.cpp
56-
index 5499012..0fdc846 100644
57-
--- a/osdep/ManagedRoute.cpp
58-
+++ b/osdep/ManagedRoute.cpp
59-
@@ -33,7 +33,7 @@
60-
#ifdef __UNIX_LIKE__
61-
#include <unistd.h>
62-
#include <sys/param.h>
63-
-#include <sys/sysctl.h>
64-
+//#include <sys/sysctl.h>
65-
#include <sys/socket.h>
66-
#include <sys/types.h>
67-
#include <sys/wait.h>
6854
--
6955
2.9.0
7056

0 commit comments

Comments
 (0)