Skip to content

Commit

Permalink
HPCC-31355 Windows build failing in GH Actions
Browse files Browse the repository at this point in the history
Older versions of MS STL is missing an implementation
for "_Thrd_sleep_for"

Signed-off-by: Gordon Smith <[email protected]>
  • Loading branch information
GordonSmith committed Feb 27, 2024
1 parent e58a275 commit 1077372
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 9 deletions.
7 changes: 6 additions & 1 deletion system/jlib/jtrace.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
limitations under the License.
############################################################################## */


#include "opentelemetry/trace/semantic_conventions.h" //known span defines
#include "opentelemetry/context/propagation/global_propagator.h" // context::propagation::GlobalTextMapPropagator::GetGlobalPropagator
#include "opentelemetry/sdk/trace/tracer_provider_factory.h" //opentelemetry::sdk::trace::TracerProviderFactory::Create(context)
Expand Down Expand Up @@ -1425,3 +1424,9 @@ ITraceManager & queryTraceManager()
{
return *theTraceManager.query([] () { return new CTraceManager; }); //throws if not initialized
}

#if WIN32 && _MSC_VER < 1939 // _MSC_VER < VS 2022 17.9
extern "C" void __stdcall _Thrd_sleep_for(const unsigned long ms) noexcept { // suspend current thread for `ms` milliseconds
Sleep(ms);
}
#endif
17 changes: 9 additions & 8 deletions vcpkg.json.in
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,15 @@
"name": "openssl",
"platform": "@VCPKG_OPENSSL@"
},
{
"name": "opentelemetry-cpp",
"default-features": false,
"features": [
"otlp",
"otlp-http",
"otlp-grpc"
]
},
{
"name": "python3",
"platform": "@VCPKG_PYTHON3@ & windows"
Expand All @@ -192,14 +201,6 @@
{
"name": "zlib",
"platform": "@VCPKG_ZLIB@"
},
{
"name": "opentelemetry-cpp",
"features": [
"otlp",
"otlp-http",
"otlp-grpc"
]
}
]
}

0 comments on commit 1077372

Please sign in to comment.