From d63b5431bf13411cf74deeb7e44b08db3fff3610 Mon Sep 17 00:00:00 2001 From: Bartosz Taudul Date: Sun, 19 Aug 2018 19:00:01 +0200 Subject: [PATCH] Discover linux kernel version. --- client/TracyProfiler.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/client/TracyProfiler.cpp b/client/TracyProfiler.cpp index 4c21680b..69edca77 100644 --- a/client/TracyProfiler.cpp +++ b/client/TracyProfiler.cpp @@ -57,6 +57,7 @@ extern "C" typedef LONG (WINAPI *t_RtlGetVersion)( PRTL_OSVERSIONINFOW ); #endif #if defined __linux__ # include +# include #endif namespace tracy @@ -193,10 +194,12 @@ static const char* GetHostInfo() # endif } #elif defined __linux__ + struct utsname utsName; + uname( &utsName ); # if defined __ANDROID__ - ptr += sprintf( ptr, "OS: Linux (Android)\n" ); + ptr += sprintf( ptr, "OS: Linux %s (Android)\n", utsName.release ); # else - ptr += sprintf( ptr, "OS: Linux\n" ); + ptr += sprintf( ptr, "OS: Linux %s\n", utsName.release ); # endif #elif defined __APPLE__ # if defined TARGET_OS_IPHONE