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) {