From 0006fbdfcdb9e2f0e7ccceb33e26c7561fecd491 Mon Sep 17 00:00:00 2001 From: Philippe Coval Date: Mon, 17 Jul 2017 09:48:14 -0700 Subject: [PATCH] Hotfix: Include functional header for g++-7.1.0 Reason is described in gcc7 porting notes: "Several C++ Standard Library headers have been changed to no longer include the header. As such, C++ programs that used components defined in without explicitly including that header will no longer compile." It was tested on yocto poky master on iotivity-1.2.1 (and later) Signed-off-by: Kishen Maloor --- ...nclude-functional-header-for-g-7.1.0.patch | 62 +++++++++++++++++++ recipes-core/iotivity/iotivity_1.2.1.bb | 3 + 2 files changed, 65 insertions(+) create mode 100644 recipes-core/iotivity/files/0189-resource-Include-functional-header-for-g-7.1.0.patch diff --git a/recipes-core/iotivity/files/0189-resource-Include-functional-header-for-g-7.1.0.patch b/recipes-core/iotivity/files/0189-resource-Include-functional-header-for-g-7.1.0.patch new file mode 100644 index 0000000..2e40f97 --- /dev/null +++ b/recipes-core/iotivity/files/0189-resource-Include-functional-header-for-g-7.1.0.patch @@ -0,0 +1,62 @@ +From fd9c363689646784303197da5a21d6693cc6cbc9 Mon Sep 17 00:00:00 2001 +From: Philippe Coval +Date: Wed, 28 Jun 2017 04:54:05 +0200 +Subject: [PATCH 189/189] resource: Include functional header for g++-7.1.0 + +It was tested on yocto poky master on iotivity-1.2.1 (and later): + + resource/include/OCUtilities.h: \ + In function 'OCStackResult OC::nil_guard(PtrT&&, FnT&&, ParamTs&& ...)': + resource/include/OCUtilities.h:85:21: \ + error: 'bind' is not a member of 'std' + return std::bind(fn, p, std::ref(params)...)(); + + resource/include/OCApi.h: At global scope: + resource/include/OCApi.h:362:18: \ + error: 'function' in namespace 'std' does not name a template type + typedef std::function)> FindCallback; + +Change-Id: Ie1cab497c33fde394f77490a1d636eb36a563396 +Origin: https://gerrit.iotivity.org/gerrit/#/c/21069/ +Signed-off-by: Philippe Coval +Reviewed-on: https://gerrit.iotivity.org/gerrit/21067 +Reviewed-by: Thiago Macieira +Tested-by: jenkins-iotivity +(cherry picked from commit 26c2798188497da22e0a70efebc47991dd755db2) +Reviewed-on: https://gerrit.iotivity.org/gerrit/21069 +Reviewed-by: Sudarsana Babu Nagineni +Reviewed-by: Mats Wichmann +--- + resource/include/OCApi.h | 2 -- + resource/include/OCUtilities.h | 1 + + 2 files changed, 1 insertion(+), 2 deletions(-) + +diff --git a/resource/include/OCApi.h b/resource/include/OCApi.h +index ff2d212..47981d5 100644 +--- a/resource/include/OCApi.h ++++ b/resource/include/OCApi.h +@@ -27,9 +27,7 @@ + #include + #include + #include +-#if defined(_MSC_VER) + #include +-#endif + + #include "octypes.h" + #include "OCHeaderOption.h" +diff --git a/resource/include/OCUtilities.h b/resource/include/OCUtilities.h +index 85039d0..f1c9304 100644 +--- a/resource/include/OCUtilities.h ++++ b/resource/include/OCUtilities.h +@@ -26,6 +26,7 @@ + #include + #include + #include ++#include + + #include + #include +-- +2.7.4 + diff --git a/recipes-core/iotivity/iotivity_1.2.1.bb b/recipes-core/iotivity/iotivity_1.2.1.bb index c01ea46..c8fb8fd 100644 --- a/recipes-core/iotivity/iotivity_1.2.1.bb +++ b/recipes-core/iotivity/iotivity_1.2.1.bb @@ -1,3 +1,4 @@ +PR = "r1" SUMMARY = "IoTivity framework and SDK sponsored by the Open Connectivity Foundation." DESCRIPTION = "IoTivity is an open source software framework enabling seamless device-to-device connectivity to address the emerging needs of the Internet of Things." HOMEPAGE = "https://www.iotivity.org/" @@ -12,6 +13,8 @@ branch_iotivity = "1.2-rel" SRCREV = "0c90ca6ffcbb6a2c56c977ec11bebb7b1d14053b" SRC_URI = "git://github.com/iotivity/iotivity.git;destsuffix=${S};branch=${branch_iotivity};protocol=http" SRC_URI += "file://0364-yocto-Use-tools-from-sysroot-before-system-PATH-agai.patch" +SRC_URI += "file://0189-resource-Include-functional-header-for-g-7.1.0.patch" + url_tinycbor = "git://github.com/01org/tinycbor.git" SRCREV_tinycbor = "31c7f81d45d115d2007b1c881cbbd3a19618465c"