Apparently program_invocation_short_name may be not defined.

This commit is contained in:
Bartosz Taudul 2021-02-11 18:12:59 +01:00
parent f0e1d77ebc
commit 5ea71ea20d
No known key found for this signature in database
GPG Key ID: B7FE2008B7575DF3

View File

@ -272,7 +272,7 @@ static const char* GetProcessName()
if( buf ) processName = buf;
# endif
#elif defined _GNU_SOURCE || defined __CYGWIN__
processName = program_invocation_short_name;
if( program_invocation_short_name ) processName = program_invocation_short_name;
#elif defined __APPLE__ || defined BSD
auto buf = getprogname();
if( buf ) processName = buf;