aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2018-09-07 13:38:09 -0700
committerKhem Raj <raj.khem@gmail.com>2018-09-09 10:46:29 -0700
commit6e56df68685adedae6c355f512e92eb845ee8fca (patch)
tree3a33edd22cb7f120c0298efa3310d5d3e222c5ba
parentd8560cb5e52bf1feeb769692004e4b20fad18d9b (diff)
downloadmeta-openembedded-contrib-6e56df68685adedae6c355f512e92eb845ee8fca.tar.gz
kea: Fix build with boost 1.68+
Signed-off-by: Khem Raj <raj.khem@gmail.com>
-rw-r--r--meta-networking/recipes-connectivity/kea/files/0001-Fix-error-call-of-overloaded-distance-is-ambiguous.patch89
-rw-r--r--meta-networking/recipes-connectivity/kea/kea_1.4.0.bb1
2 files changed, 90 insertions, 0 deletions
diff --git a/meta-networking/recipes-connectivity/kea/files/0001-Fix-error-call-of-overloaded-distance-is-ambiguous.patch b/meta-networking/recipes-connectivity/kea/files/0001-Fix-error-call-of-overloaded-distance-is-ambiguous.patch
new file mode 100644
index 0000000000..fb16ecbf99
--- /dev/null
+++ b/meta-networking/recipes-connectivity/kea/files/0001-Fix-error-call-of-overloaded-distance-is-ambiguous.patch
@@ -0,0 +1,89 @@
+From 8ea2ee451a1af7c5b5c8f4b36c1f77d44442064d Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Fri, 7 Sep 2018 13:02:35 -0700
+Subject: [PATCH] Fix error: call of overloaded distance is ambiguous
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+The boost::iterators::distance function template is an adapted version
+of std::distance for the Boost iterator traversal in 2.68 it has started
+to fail with argument dependent lookup and compiler is erroring out
+
+with
+
+error: call of overloaded ‘distance'
+
+boost implementation of distance is protected against being found by ADL
+
+The way function is called in libdhcp means it will be found via ADL and
+all namespaces will be considered which is providing problematic since
+its getting it from both std:: and boost:: namespaces
+
+so let it not rely on ADL by qualifying then calls with std:: namespace
+
+Upstream-Status: Submitted [https://github.com/isc-projects/kea/pull/103]
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ src/lib/dhcp/libdhcp++.cc | 12 ++++++------
+ 1 file changed, 6 insertions(+), 6 deletions(-)
+
+diff --git a/src/lib/dhcp/libdhcp++.cc b/src/lib/dhcp/libdhcp++.cc
+index 330c02b..ced705d 100644
+--- a/src/lib/dhcp/libdhcp++.cc
++++ b/src/lib/dhcp/libdhcp++.cc
+@@ -419,14 +419,14 @@ size_t LibDHCP::unpackOptions6(const OptionBuffer& buf,
+ // We previously did the lookup only for dhcp6 option space, but with the
+ // addition of S46 options, we now do it for every space.
+ range = idx.equal_range(opt_type);
+- num_defs = distance(range.first, range.second);
++ num_defs = std::distance(range.first, range.second);
+
+ // Standard option definitions do not include the definition for
+ // our option or we're searching for non-standard option. Try to
+ // find the definition among runtime option definitions.
+ if (num_defs == 0) {
+ range = runtime_idx.equal_range(opt_type);
+- num_defs = distance(range.first, range.second);
++ num_defs = std::distance(range.first, range.second);
+ }
+
+ OptionPtr opt;
+@@ -538,14 +538,14 @@ size_t LibDHCP::unpackOptions4(const OptionBuffer& buf,
+ // may be standard options in other spaces (e.g. radius). So we now do
+ // the lookup for every space.
+ range = idx.equal_range(opt_type);
+- num_defs = distance(range.first, range.second);
++ num_defs = std::distance(range.first, range.second);
+
+ // Standard option definitions do not include the definition for
+ // our option or we're searching for non-standard option. Try to
+ // find the definition among runtime option definitions.
+ if (num_defs == 0) {
+ range = runtime_idx.equal_range(opt_type);
+- num_defs = distance(range.first, range.second);
++ num_defs = std::distance(range.first, range.second);
+ }
+
+ // Check if option unpacking must be deferred
+@@ -638,7 +638,7 @@ size_t LibDHCP::unpackVendorOptions6(const uint32_t vendor_id,
+ idx->equal_range(opt_type);
+ // Get the number of returned option definitions for the
+ // option code.
+- size_t num_defs = distance(range.first, range.second);
++ size_t num_defs = std::distance(range.first, range.second);
+
+ if (num_defs > 1) {
+ // Multiple options of the same code are not supported
+@@ -746,7 +746,7 @@ size_t LibDHCP::unpackVendorOptions4(const uint32_t vendor_id, const OptionBuffe
+ idx->equal_range(opt_type);
+ // Get the number of returned option definitions for
+ // the option code.
+- size_t num_defs = distance(range.first, range.second);
++ size_t num_defs = std::distance(range.first, range.second);
+
+ if (num_defs > 1) {
+ // Multiple options of the same code are not
+--
+2.18.0
+
diff --git a/meta-networking/recipes-connectivity/kea/kea_1.4.0.bb b/meta-networking/recipes-connectivity/kea/kea_1.4.0.bb
index ba01b8c1c9..67de07b31f 100644
--- a/meta-networking/recipes-connectivity/kea/kea_1.4.0.bb
+++ b/meta-networking/recipes-connectivity/kea/kea_1.4.0.bb
@@ -10,6 +10,7 @@ DEPENDS += "kea-native"
SRC_URI = "\
http://ftp.isc.org/isc/kea/${PV}/${BP}.tar.gz \
file://0003-Makefile.am-update-hooksdir-for-lease_cmds.patch \
+ file://0001-Fix-error-call-of-overloaded-distance-is-ambiguous.patch \
file://kea-dhcp4.service \
file://kea-dhcp6.service \
file://kea-dhcp-ddns.service \