summaryrefslogtreecommitdiff
path: root/common/utils.c
diff options
context:
space:
mode:
Diffstat (limited to 'common/utils.c')
-rw-r--r--common/utils.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/common/utils.c b/common/utils.c
index 49dc25e..f3443aa 100644
--- a/common/utils.c
+++ b/common/utils.c
@@ -46,6 +46,11 @@ getpname(void)
p = getexecname();
#elif HAVE_GETPROGNAME
p = getprogname();
+#elif defined(__linux__)
+ {
+ extern char *program_invocation_short_name;
+ p = program_invocation_short_name;
+ }
#else
# error dont know how to find my executable name
#endif