File onnxruntime-fix-chrono-cxx20-gcc.patch of Package onnxruntime
diff --git a/include/onnxruntime/core/common/logging/logging.h b/include/onnxruntime/core/common/logging/logging.h index dc930ce52e..85ccea2b0e 100644 --- a/include/onnxruntime/core/common/logging/logging.h +++ b/include/onnxruntime/core/common/logging/logging.h @@ -11,6 +11,8 @@ #include <mutex> #include <string> +#include <boost/predef.h> + #include "core/common/common.h" #include "core/common/profiler_common.h" #include "core/common/logging/capture.h" @@ -86,6 +88,12 @@ using Timestamp = std::chrono::time_point<std::chrono::system_clock>; #endif #endif // __APPLE__ +#if BOOST_COMP_GNUC + #if BOOST_COMP_GNUC < BOOST_VERSION_NUMBER(13,1,0) + #undef ORT_USE_CXX20_STD_CHRONO + #endif +#endif + #if ORT_USE_CXX20_STD_CHRONO namespace timestamp_ns = std::chrono; #else