Radish alpha
H
rad:z3QDZAW2FAfuLvihrhiyDC9fAD8G9
HardenedBSD Package Manager
Radicle
Git
Provide getprogname() on non-glibc Linux
Daniel Kolesa committed 4 years ago
commit 7caffe6dd431ac2cadcdeec253ee4e61e5da0766
parent 2a489a7
1 file changed +4 -1
modified compat/bsd_compat.h
@@ -188,7 +188,10 @@ FILE * funopen(const void *cookie, int (*readfn)(void *, char *, int),
#endif

#if !HAVE_GETPROGNAME
-
#ifdef __GLIBC__
+
#if defined(__linux__)
+
extern char *__progname;
+
# define getprogname() __progname
+
#elif defined(__GLIBC__)
extern char *program_invocation_short_name;
# define getprogname() program_invocation_short_name
#else