1 |
commit: fb3b31011ce8ed80f5f4a43c56bfe504c51f534f |
2 |
Author: Alexis Ballier <aballier <AT> gentoo <DOT> org> |
3 |
AuthorDate: Wed Sep 13 11:23:52 2017 +0000 |
4 |
Commit: Alexis Ballier <aballier <AT> gentoo <DOT> org> |
5 |
CommitDate: Wed Sep 13 11:24:04 2017 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=fb3b3101 |
7 |
|
8 |
net-vpn/freelan: Backport upstream patches to build with gcc7 and glibc 2.25. Bug #580514. |
9 |
|
10 |
Package-Manager: Portage-2.3.8, Repoman-2.3.3 |
11 |
|
12 |
net-vpn/freelan/files/gcc7.patch | 60 ++++++++++++++++++++++++++++++++++++ |
13 |
net-vpn/freelan/files/glibc225.patch | 21 +++++++++++++ |
14 |
net-vpn/freelan/freelan-2.0.ebuild | 4 ++- |
15 |
3 files changed, 84 insertions(+), 1 deletion(-) |
16 |
|
17 |
diff --git a/net-vpn/freelan/files/gcc7.patch b/net-vpn/freelan/files/gcc7.patch |
18 |
new file mode 100644 |
19 |
index 00000000000..71bcf3d9a84 |
20 |
--- /dev/null |
21 |
+++ b/net-vpn/freelan/files/gcc7.patch |
22 |
@@ -0,0 +1,60 @@ |
23 |
+commit 5014a8023b42762052d6417ebbc0cd2adb1fda90 |
24 |
+Author: Sebastien Vincent <sebastien.vincent@×××××××××.com> |
25 |
+Date: Sat Aug 5 20:10:55 2017 +0200 |
26 |
+ |
27 |
+ Fixes compilation with g++-7. |
28 |
+ |
29 |
+diff --git a/libs/asiotap/src/posix/posix_tap_adapter.cpp b/libs/asiotap/src/posix/posix_tap_adapter.cpp |
30 |
+index 71377cee..cdd7abf3 100644 |
31 |
+--- a/libs/asiotap/src/posix/posix_tap_adapter.cpp |
32 |
++++ b/libs/asiotap/src/posix/posix_tap_adapter.cpp |
33 |
+@@ -206,6 +206,7 @@ namespace asiotap |
34 |
+ { |
35 |
+ result[name] = name; |
36 |
+ } |
37 |
++ break; |
38 |
+ } |
39 |
+ case tap_adapter_layer::ip: |
40 |
+ { |
41 |
+@@ -213,6 +214,7 @@ namespace asiotap |
42 |
+ { |
43 |
+ result[name] = name; |
44 |
+ } |
45 |
++ break; |
46 |
+ } |
47 |
+ } |
48 |
+ } |
49 |
+diff --git a/libs/netlinkplus/include/netlinkplus/endpoint.hpp b/libs/netlinkplus/include/netlinkplus/endpoint.hpp |
50 |
+index 3503cae3..74fb7e1b 100644 |
51 |
+--- a/libs/netlinkplus/include/netlinkplus/endpoint.hpp |
52 |
++++ b/libs/netlinkplus/include/netlinkplus/endpoint.hpp |
53 |
+@@ -44,6 +44,8 @@ |
54 |
+ |
55 |
+ #pragma once |
56 |
+ |
57 |
++#include <cstring> |
58 |
++ |
59 |
+ #include <boost/asio.hpp> |
60 |
+ |
61 |
+ #include <linux/netlink.h> |
62 |
+@@ -125,17 +127,17 @@ namespace netlinkplus |
63 |
+ |
64 |
+ friend bool operator==(const netlink_endpoint& lhs, const netlink_endpoint& rhs) |
65 |
+ { |
66 |
+- return (lhs.m_sockaddr == rhs.m_sockaddr); |
67 |
++ return (std::memcmp(&lhs.m_sockaddr, &rhs.m_sockaddr, sizeof(sockaddr_nl)) == 0); |
68 |
+ } |
69 |
+ |
70 |
+ friend bool operator!=(const netlink_endpoint& lhs, const netlink_endpoint& rhs) |
71 |
+ { |
72 |
+- return (lhs.m_sockaddr != rhs.m_sockaddr); |
73 |
++ return (std::memcmp(&lhs.m_sockaddr, &rhs.m_sockaddr, sizeof(sockaddr_nl)) != 0); |
74 |
+ } |
75 |
+ |
76 |
+ friend bool operator<(const netlink_endpoint& lhs, const netlink_endpoint& rhs) |
77 |
+ { |
78 |
+- return (lhs.m_sockaddr < rhs.m_sockaddr); |
79 |
++ return (std::memcmp(&lhs.m_sockaddr, &rhs.m_sockaddr, sizeof(sockaddr_nl)) < 0); |
80 |
+ } |
81 |
+ |
82 |
+ private: |
83 |
|
84 |
diff --git a/net-vpn/freelan/files/glibc225.patch b/net-vpn/freelan/files/glibc225.patch |
85 |
new file mode 100644 |
86 |
index 00000000000..e21df29d1ae |
87 |
--- /dev/null |
88 |
+++ b/net-vpn/freelan/files/glibc225.patch |
89 |
@@ -0,0 +1,21 @@ |
90 |
+commit 597b6eb65b4ea68f0fe8015db38ce68b71c280d7 |
91 |
+Author: Florian Lamprecht <florian_lamprecht@×××.de> |
92 |
+Date: Sun Mar 19 13:37:27 2017 +0100 |
93 |
+ |
94 |
+ Fix a compiler warning on linux |
95 |
+ |
96 |
+ include a systemmacro explictly to avoid warning, which is handled as error. |
97 |
+ |
98 |
+diff --git a/libs/asiotap/src/posix/posix_tap_adapter.cpp b/libs/asiotap/src/posix/posix_tap_adapter.cpp |
99 |
+index 74e9eb2a..71377cee 100644 |
100 |
+--- a/libs/asiotap/src/posix/posix_tap_adapter.cpp |
101 |
++++ b/libs/asiotap/src/posix/posix_tap_adapter.cpp |
102 |
+@@ -56,7 +56,7 @@ |
103 |
+ #ifdef LINUX |
104 |
+ |
105 |
+ #include <linux/if_tun.h> |
106 |
+- |
107 |
++#include <sys/sysmacros.h> |
108 |
+ /** |
109 |
+ * \struct in6_ifreq |
110 |
+ * \brief Replacement structure since the include of linux/ipv6.h introduces conflicts. |
111 |
|
112 |
diff --git a/net-vpn/freelan/freelan-2.0.ebuild b/net-vpn/freelan/freelan-2.0.ebuild |
113 |
index 477b6f862c3..eb641501a7e 100644 |
114 |
--- a/net-vpn/freelan/freelan-2.0.ebuild |
115 |
+++ b/net-vpn/freelan/freelan-2.0.ebuild |
116 |
@@ -30,7 +30,9 @@ src_prepare() { |
117 |
"${FILESDIR}/boost158.patch" \ |
118 |
"${FILESDIR}/mf.patch" \ |
119 |
"${FILESDIR}/prefix.patch" \ |
120 |
- "${FILESDIR}/boost163.patch" |
121 |
+ "${FILESDIR}/boost163.patch" \ |
122 |
+ "${FILESDIR}/glibc225.patch" \ |
123 |
+ "${FILESDIR}/gcc7.patch" |
124 |
|
125 |
sed -e "s/CXXFLAGS='-O3'/CXXFLAGS=''/" \ |
126 |
-e "s/CXXFLAGS=\['-Werror'\]/CXXFLAGS=[]/" \ |