mirror of
https://github.com/wolfpld/tracy.git
synced 2025-03-20 07:40:02 +08:00
Discover linux kernel version.
This commit is contained in:
parent
f55b99ba7e
commit
d63b5431bf
@ -57,6 +57,7 @@ extern "C" typedef LONG (WINAPI *t_RtlGetVersion)( PRTL_OSVERSIONINFOW );
|
|||||||
#endif
|
#endif
|
||||||
#if defined __linux__
|
#if defined __linux__
|
||||||
# include <sys/sysinfo.h>
|
# include <sys/sysinfo.h>
|
||||||
|
# include <sys/utsname.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
namespace tracy
|
namespace tracy
|
||||||
@ -193,10 +194,12 @@ static const char* GetHostInfo()
|
|||||||
# endif
|
# endif
|
||||||
}
|
}
|
||||||
#elif defined __linux__
|
#elif defined __linux__
|
||||||
|
struct utsname utsName;
|
||||||
|
uname( &utsName );
|
||||||
# if defined __ANDROID__
|
# if defined __ANDROID__
|
||||||
ptr += sprintf( ptr, "OS: Linux (Android)\n" );
|
ptr += sprintf( ptr, "OS: Linux %s (Android)\n", utsName.release );
|
||||||
# else
|
# else
|
||||||
ptr += sprintf( ptr, "OS: Linux\n" );
|
ptr += sprintf( ptr, "OS: Linux %s\n", utsName.release );
|
||||||
# endif
|
# endif
|
||||||
#elif defined __APPLE__
|
#elif defined __APPLE__
|
||||||
# if defined TARGET_OS_IPHONE
|
# if defined TARGET_OS_IPHONE
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user