From c5594877181b2dde4a87639689972a07cd6a3bc2 Mon Sep 17 00:00:00 2001 From: Pavel Odintsov Date: Mon, 3 Apr 2023 13:58:05 +0100 Subject: [PATCH] We need different approach for detect windows version --- src/fast_library.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/fast_library.cpp b/src/fast_library.cpp index db7fa32..40a025e 100644 --- a/src/fast_library.cpp +++ b/src/fast_library.cpp @@ -7,8 +7,10 @@ #include #endif +#ifndef _WIN32 // For uname function #include +#endif #include "all_logcpp_libraries.hpp" @@ -2221,6 +2223,12 @@ std::string get_virtualisation_method() { return boost::algorithm::to_lower_copy(output[0]); } +#ifdef _WIN32 +bool get_kernel_version(std::string& kernel_version) { + kernel_version = "windows"; + return true; +} +#else // Get linux kernel version in form: 3.19.0-25-generic bool get_kernel_version(std::string& kernel_version) { struct utsname current_utsname; @@ -2236,6 +2244,7 @@ bool get_kernel_version(std::string& kernel_version) { return true; } +#endif // Returns all CPU flags in vector bool get_cpu_flags(std::vector& flags) {