|
| 1 | +From 26c2798188497da22e0a70efebc47991dd755db2 Mon Sep 17 00:00:00 2001 |
| 2 | +From: Philippe Coval <philippe.coval@osg.samsung.com> |
| 3 | +Date: Wed, 28 Jun 2017 04:54:05 +0200 |
| 4 | +Subject: [PATCH] resource: Include functional header for g++-7.1.0 |
| 5 | + |
| 6 | +It was tested on yocto poky master on iotivity-1.2.1 (and later): |
| 7 | + |
| 8 | + resource/include/OCUtilities.h: \ |
| 9 | + In function 'OCStackResult OC::nil_guard(PtrT&&, FnT&&, ParamTs&& ...)': |
| 10 | + resource/include/OCUtilities.h:85:21: \ |
| 11 | + error: 'bind' is not a member of 'std' |
| 12 | + return std::bind(fn, p, std::ref(params)...)(); |
| 13 | + |
| 14 | + resource/include/OCApi.h: At global scope: |
| 15 | + resource/include/OCApi.h:362:18: \ |
| 16 | + error: 'function' in namespace 'std' does not name a template type |
| 17 | + typedef std::function<void(std::shared_ptr<OCResource>)> FindCallback; |
| 18 | + |
| 19 | +Change-Id: Ie1cab497c33fde394f77490a1d636eb36a563396 |
| 20 | +Origin: https://gerrit.iotivity.org/gerrit/#/c/21069/ |
| 21 | +Signed-off-by: Philippe Coval <philippe.coval@osg.samsung.com> |
| 22 | +Reviewed-on: https://gerrit.iotivity.org/gerrit/21067 |
| 23 | +Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> |
| 24 | +Tested-by: jenkins-iotivity <jenkins@iotivity.org> |
| 25 | + |
| 26 | +Upstream-Status: Backport [https://gerrit.iotivity.org/gerrit/gitweb?p=iotivity.git;a=commit;h=cedb81a54e08e56f4a0ffac9c318a0b1b1623239] |
| 27 | + |
| 28 | +--- |
| 29 | + resource/include/OCApi.h | 2 -- |
| 30 | + resource/include/OCUtilities.h | 1 + |
| 31 | + 2 files changed, 1 insertion(+), 2 deletions(-) |
| 32 | + |
| 33 | +diff --git a/resource/include/OCApi.h b/resource/include/OCApi.h |
| 34 | +index 4e14f29..af97215 100644 |
| 35 | +--- a/resource/include/OCApi.h |
| 36 | ++++ b/resource/include/OCApi.h |
| 37 | +@@ -27,9 +27,7 @@ |
| 38 | + #include <map> |
| 39 | + #include <memory> |
| 40 | + #include <iterator> |
| 41 | +-#if defined(_MSC_VER) |
| 42 | + #include <functional> |
| 43 | +-#endif |
| 44 | + |
| 45 | + #include "iotivity_config.h" |
| 46 | + #include "iotivity_debug.h" |
| 47 | +diff --git a/resource/include/OCUtilities.h b/resource/include/OCUtilities.h |
| 48 | +index 85039d0..f1c9304 100644 |
| 49 | +--- a/resource/include/OCUtilities.h |
| 50 | ++++ b/resource/include/OCUtilities.h |
| 51 | +@@ -26,6 +26,7 @@ |
| 52 | + #include <memory> |
| 53 | + #include <utility> |
| 54 | + #include <exception> |
| 55 | ++#include <functional> |
| 56 | + |
| 57 | + #include <OCException.h> |
| 58 | + #include <StringConstants.h> |
| 59 | +-- |
| 60 | +2.1.4 |
| 61 | + |
0 commit comments