mirror of
https://github.com/wolfpld/tracy.git
synced 2024-11-25 23:44:35 +00:00
program_invocation_short_name is Linux-specific
'program_invocation_short_name' is Linux-specific; other OSs such as macOS do not support it. Fixes build break on macOS 12.2 with _GNU_SOURCE defined.
This commit is contained in:
parent
31e4bef135
commit
2073ffb684
@ -391,7 +391,7 @@ static const char* GetProcessName()
|
|||||||
auto buf = getprogname();
|
auto buf = getprogname();
|
||||||
if( buf ) processName = buf;
|
if( buf ) processName = buf;
|
||||||
# endif
|
# endif
|
||||||
#elif defined _GNU_SOURCE
|
#elif defined __linux__ && defined _GNU_SOURCE
|
||||||
if( program_invocation_short_name ) processName = program_invocation_short_name;
|
if( program_invocation_short_name ) processName = program_invocation_short_name;
|
||||||
#elif defined __APPLE__ || defined BSD
|
#elif defined __APPLE__ || defined BSD
|
||||||
auto buf = getprogname();
|
auto buf = getprogname();
|
||||||
@ -408,7 +408,7 @@ static const char* GetProcessExecutablePath()
|
|||||||
return buf;
|
return buf;
|
||||||
#elif defined __ANDROID__
|
#elif defined __ANDROID__
|
||||||
return nullptr;
|
return nullptr;
|
||||||
#elif defined _GNU_SOURCE
|
#elif defined __linux__ && defined _GNU_SOURCE
|
||||||
return program_invocation_name;
|
return program_invocation_name;
|
||||||
#elif defined __APPLE__
|
#elif defined __APPLE__
|
||||||
static char buf[1024];
|
static char buf[1024];
|
||||||
|
Loading…
Reference in New Issue
Block a user