You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

58 lines
1.9 KiB

  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. It was tested on yocto poky master on iotivity-1.2.1 (and later):
  6. resource/include/OCUtilities.h: \
  7. In function 'OCStackResult OC::nil_guard(PtrT&&, FnT&&, ParamTs&& ...)':
  8. resource/include/OCUtilities.h:85:21: \
  9. error: 'bind' is not a member of 'std'
  10. return std::bind(fn, p, std::ref(params)...)();
  11. resource/include/OCApi.h: At global scope:
  12. resource/include/OCApi.h:362:18: \
  13. error: 'function' in namespace 'std' does not name a template type
  14. typedef std::function<void(std::shared_ptr<OCResource>)> FindCallback;
  15. Change-Id: Ie1cab497c33fde394f77490a1d636eb36a563396
  16. Origin: https://gerrit.iotivity.org/gerrit/#/c/21069/
  17. Signed-off-by: Philippe Coval <philippe.coval@osg.samsung.com>
  18. Reviewed-on: https://gerrit.iotivity.org/gerrit/21067
  19. Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
  20. Tested-by: jenkins-iotivity <jenkins@iotivity.org>
  21. ---
  22. resource/include/OCApi.h | 2 --
  23. resource/include/OCUtilities.h | 1 +
  24. 2 files changed, 1 insertion(+), 2 deletions(-)
  25. diff --git a/resource/include/OCApi.h b/resource/include/OCApi.h
  26. index 4e14f29cc..af9721554 100644
  27. --- a/resource/include/OCApi.h
  28. +++ b/resource/include/OCApi.h
  29. @@ -27,9 +27,7 @@
  30. #include <map>
  31. #include <memory>
  32. #include <iterator>
  33. -#if defined(_MSC_VER)
  34. #include <functional>
  35. -#endif
  36. #include "octypes.h"
  37. #include "OCHeaderOption.h"
  38. diff --git a/resource/include/OCUtilities.h b/resource/include/OCUtilities.h
  39. index 85039d0c1..f1c93045f 100644
  40. --- a/resource/include/OCUtilities.h
  41. +++ b/resource/include/OCUtilities.h
  42. @@ -26,6 +26,7 @@
  43. #include <memory>
  44. #include <utility>
  45. #include <exception>
  46. +#include <functional>
  47. #include <OCException.h>
  48. #include <StringConstants.h>
  49. --
  50. 2.17.1