summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexis Ballier <aballier@gentoo.org>2017-09-13 13:23:52 +0200
committerAlexis Ballier <aballier@gentoo.org>2017-09-13 13:24:04 +0200
commitfb3b31011ce8ed80f5f4a43c56bfe504c51f534f (patch)
tree84ab7eb253a761d1b13dfb626db20c6951125dfd /net-vpn/freelan
parentros-meta/rosbridge_suite: Bump to 0.8.3. (diff)
downloadgentoo-fb3b31011ce8ed80f5f4a43c56bfe504c51f534f.tar.gz
gentoo-fb3b31011ce8ed80f5f4a43c56bfe504c51f534f.tar.bz2
gentoo-fb3b31011ce8ed80f5f4a43c56bfe504c51f534f.zip
net-vpn/freelan: Backport upstream patches to build with gcc7 and glibc 2.25. Bug #580514.
Package-Manager: Portage-2.3.8, Repoman-2.3.3
Diffstat (limited to 'net-vpn/freelan')
-rw-r--r--net-vpn/freelan/files/gcc7.patch60
-rw-r--r--net-vpn/freelan/files/glibc225.patch21
-rw-r--r--net-vpn/freelan/freelan-2.0.ebuild4
3 files changed, 84 insertions, 1 deletions
diff --git a/net-vpn/freelan/files/gcc7.patch b/net-vpn/freelan/files/gcc7.patch
new file mode 100644
index 000000000000..71bcf3d9a841
--- /dev/null
+++ b/net-vpn/freelan/files/gcc7.patch
@@ -0,0 +1,60 @@
+commit 5014a8023b42762052d6417ebbc0cd2adb1fda90
+Author: Sebastien Vincent <sebastien.vincent@cppextrem.com>
+Date: Sat Aug 5 20:10:55 2017 +0200
+
+ Fixes compilation with g++-7.
+
+diff --git a/libs/asiotap/src/posix/posix_tap_adapter.cpp b/libs/asiotap/src/posix/posix_tap_adapter.cpp
+index 71377cee..cdd7abf3 100644
+--- a/libs/asiotap/src/posix/posix_tap_adapter.cpp
++++ b/libs/asiotap/src/posix/posix_tap_adapter.cpp
+@@ -206,6 +206,7 @@ namespace asiotap
+ {
+ result[name] = name;
+ }
++ break;
+ }
+ case tap_adapter_layer::ip:
+ {
+@@ -213,6 +214,7 @@ namespace asiotap
+ {
+ result[name] = name;
+ }
++ break;
+ }
+ }
+ }
+diff --git a/libs/netlinkplus/include/netlinkplus/endpoint.hpp b/libs/netlinkplus/include/netlinkplus/endpoint.hpp
+index 3503cae3..74fb7e1b 100644
+--- a/libs/netlinkplus/include/netlinkplus/endpoint.hpp
++++ b/libs/netlinkplus/include/netlinkplus/endpoint.hpp
+@@ -44,6 +44,8 @@
+
+ #pragma once
+
++#include <cstring>
++
+ #include <boost/asio.hpp>
+
+ #include <linux/netlink.h>
+@@ -125,17 +127,17 @@ namespace netlinkplus
+
+ friend bool operator==(const netlink_endpoint& lhs, const netlink_endpoint& rhs)
+ {
+- return (lhs.m_sockaddr == rhs.m_sockaddr);
++ return (std::memcmp(&lhs.m_sockaddr, &rhs.m_sockaddr, sizeof(sockaddr_nl)) == 0);
+ }
+
+ friend bool operator!=(const netlink_endpoint& lhs, const netlink_endpoint& rhs)
+ {
+- return (lhs.m_sockaddr != rhs.m_sockaddr);
++ return (std::memcmp(&lhs.m_sockaddr, &rhs.m_sockaddr, sizeof(sockaddr_nl)) != 0);
+ }
+
+ friend bool operator<(const netlink_endpoint& lhs, const netlink_endpoint& rhs)
+ {
+- return (lhs.m_sockaddr < rhs.m_sockaddr);
++ return (std::memcmp(&lhs.m_sockaddr, &rhs.m_sockaddr, sizeof(sockaddr_nl)) < 0);
+ }
+
+ private:
diff --git a/net-vpn/freelan/files/glibc225.patch b/net-vpn/freelan/files/glibc225.patch
new file mode 100644
index 000000000000..e21df29d1aec
--- /dev/null
+++ b/net-vpn/freelan/files/glibc225.patch
@@ -0,0 +1,21 @@
+commit 597b6eb65b4ea68f0fe8015db38ce68b71c280d7
+Author: Florian Lamprecht <florian_lamprecht@gmx.de>
+Date: Sun Mar 19 13:37:27 2017 +0100
+
+ Fix a compiler warning on linux
+
+ include a systemmacro explictly to avoid warning, which is handled as error.
+
+diff --git a/libs/asiotap/src/posix/posix_tap_adapter.cpp b/libs/asiotap/src/posix/posix_tap_adapter.cpp
+index 74e9eb2a..71377cee 100644
+--- a/libs/asiotap/src/posix/posix_tap_adapter.cpp
++++ b/libs/asiotap/src/posix/posix_tap_adapter.cpp
+@@ -56,7 +56,7 @@
+ #ifdef LINUX
+
+ #include <linux/if_tun.h>
+-
++#include <sys/sysmacros.h>
+ /**
+ * \struct in6_ifreq
+ * \brief Replacement structure since the include of linux/ipv6.h introduces conflicts.
diff --git a/net-vpn/freelan/freelan-2.0.ebuild b/net-vpn/freelan/freelan-2.0.ebuild
index 477b6f862c32..eb641501a7e4 100644
--- a/net-vpn/freelan/freelan-2.0.ebuild
+++ b/net-vpn/freelan/freelan-2.0.ebuild
@@ -30,7 +30,9 @@ src_prepare() {
"${FILESDIR}/boost158.patch" \
"${FILESDIR}/mf.patch" \
"${FILESDIR}/prefix.patch" \
- "${FILESDIR}/boost163.patch"
+ "${FILESDIR}/boost163.patch" \
+ "${FILESDIR}/glibc225.patch" \
+ "${FILESDIR}/gcc7.patch"
sed -e "s/CXXFLAGS='-O3'/CXXFLAGS=''/" \
-e "s/CXXFLAGS=\['-Werror'\]/CXXFLAGS=[]/" \