diff --git a/cmake/patches/cpp_client_telemetry/cpp_client_telemetry.patch b/cmake/patches/cpp_client_telemetry/cpp_client_telemetry.patch index 4a63bf2d79019..e2b092c130ff1 100644 --- a/cmake/patches/cpp_client_telemetry/cpp_client_telemetry.patch +++ b/cmake/patches/cpp_client_telemetry/cpp_client_telemetry.patch @@ -42,6 +42,19 @@ { LOG_ERROR("Unable to allocate memory to pack EventProperties"); +--- a/lib/pal/posix/sysinfo_sources.cpp ++++ b/lib/pal/posix/sysinfo_sources.cpp +@@ -114,7 +114,8 @@ + { + std::array buffer; + std::string result; +- std::shared_ptr pipe(popen(cmd, "r"), pclose); ++ auto close_pipe = [](FILE* file) { pclose(file); }; ++ std::unique_ptr pipe(popen(cmd, "r"), close_pipe); + if (!pipe) + { + // throw std::runtime_error("popen() failed!"); + --- a/lib/CMakeLists.txt +++ b/lib/CMakeLists.txt @@ -7,7 +7,7 @@