summaryrefslogtreecommitdiff
path: root/common/utils.c
diff options
context:
space:
mode:
authorWez Furlong <wez@netevil.org>2011-04-03 16:00:01 -0400
committerWez Furlong <wez@netevil.org>2011-04-03 16:00:01 -0400
commite9f8c2cd7be8f75fb1d6d9bdb7f3f418d5068e04 (patch)
tree98ef134b0997b71bc30b176d2752dab7eb3b2c1c /common/utils.c
parentee2b74dbc88c21f3e6c53d6d4f09a69b271755e4 (diff)
downloadctf-e9f8c2cd7be8f75fb1d6d9bdb7f3f418d5068e04.tar.gz
pull in the FreeBSD libdwarf, so that we can compile without an external
dependency.
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