Discover linux kernel version.

This commit is contained in:
Bartosz Taudul 2018-08-19 19:00:01 +02:00
parent f55b99ba7e
commit d63b5431bf

View File

@ -57,6 +57,7 @@ extern "C" typedef LONG (WINAPI *t_RtlGetVersion)( PRTL_OSVERSIONINFOW );
#endif
#if defined __linux__
# include <sys/sysinfo.h>
# include <sys/utsname.h>
#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