commit a29471d25a84a96ed12b8a7b484a91f9073e95f5 from: Sven M. Hallberg date: Wed Nov 22 23:38:01 2023 UTC define a replacement for getprogname on Linux commit - d9e925017c18eb73146d32306317be707e71176e commit + a29471d25a84a96ed12b8a7b484a91f9073e95f5 blob - edd0340c4eb76f5d11b0033c407860a91b222408 blob + 8fbba4fc5d5490d6dae4b2e0d0a4ef8a622b2385 --- platform.h +++ platform.h @@ -32,4 +32,10 @@ #define pledge(promises, execpromises) 0 /* success */ #endif +/* define a replacement for getprogname() where needed */ +#ifdef __linux__ +extern char *program_invocation_short_name; /* glibc extension */ +#define getprogname() program_invocation_short_name +#endif + #endif /* PLATFORM_H_ */