From e74263dfd06d4caf55d8a366e2ec7327550cab1d Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Wed, 9 Oct 2019 13:39:43 -0700 Subject: metrics-discovery: Fix build with clang Signed-off-by: Khem Raj Signed-off-by: Anuj Mittal --- ....h-Replace-string.h-with-string-C-header-.patch | 34 ++++++++++++++++++++++ .../metrics-discovery/metrics-discovery_1.5.108.bb | 4 ++- 2 files changed, 37 insertions(+), 1 deletion(-) create mode 100644 recipes-graphics/metrics-discovery/metrics-discovery/0001-md_internal.h-Replace-string.h-with-string-C-header-.patch (limited to 'recipes-graphics') diff --git a/recipes-graphics/metrics-discovery/metrics-discovery/0001-md_internal.h-Replace-string.h-with-string-C-header-.patch b/recipes-graphics/metrics-discovery/metrics-discovery/0001-md_internal.h-Replace-string.h-with-string-C-header-.patch new file mode 100644 index 00000000..d97c6543 --- /dev/null +++ b/recipes-graphics/metrics-discovery/metrics-discovery/0001-md_internal.h-Replace-string.h-with-string-C-header-.patch @@ -0,0 +1,34 @@ +From 8c11096a0e5cf980309692ae3e272108da5f2b4e Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Wed, 9 Oct 2019 11:36:56 -0700 +Subject: [PATCH] md_internal.h: Replace string.h with C++ header API + +This helps in compiling with libc++/Clang +Fixes +usr/include/c++/v1/type_traits:1561:38: error: implicit instantiation of undefined template 'std::__1::hash, std::__1::allocator > >' +: public integral_constant {}; +^ + +Upstream-Status: Submitted [https://github.com/intel/metrics-discovery/pull/14] +Signed-off-by: Khem Raj +--- + instrumentation/metrics_discovery/common/md_internal.cpp | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/instrumentation/metrics_discovery/common/md_internal.cpp b/instrumentation/metrics_discovery/common/md_internal.cpp +index f9571ac..0767e81 100644 +--- a/instrumentation/metrics_discovery/common/md_internal.cpp ++++ b/instrumentation/metrics_discovery/common/md_internal.cpp +@@ -27,8 +27,8 @@ + \*****************************************************************************/ + #include "md_internal.h" + +-#include + #include ++#include + #include + #include + +-- +2.23.0 + diff --git a/recipes-graphics/metrics-discovery/metrics-discovery_1.5.108.bb b/recipes-graphics/metrics-discovery/metrics-discovery_1.5.108.bb index 6267718e..da7cb652 100644 --- a/recipes-graphics/metrics-discovery/metrics-discovery_1.5.108.bb +++ b/recipes-graphics/metrics-discovery/metrics-discovery_1.5.108.bb @@ -9,7 +9,9 @@ inherit pkgconfig cmake S = "${WORKDIR}/git" SRCREV = "a495db4682b7318bc82b1cccfb17fafdf2e3a2ff" -SRC_URI = "git://github.com/intel/metrics-discovery.git" +SRC_URI = "git://github.com/intel/metrics-discovery.git \ + file://0001-md_internal.h-Replace-string.h-with-string-C-header-.patch \ + " EXTRA_OECMAKE += "-DMD_PLATFORM=linux" EXTRA_OECMAKE += "-DMD_LIBDRM_SRC=${STAGING_INCDIR}" -- cgit v1.2.3-54-g00ecf