util: Try finding out application name using dladdr if available
authorFelipe Sateler <fsateler@debian.org>
Sat, 11 Oct 2014 04:34:23 +0000 (01:34 -0300)
committerDavid Henningsson <david.henningsson@canonical.com>
Thu, 16 Oct 2014 13:57:21 +0000 (15:57 +0200)
commit93c698c9fc8f67a941fbfa028c6fb362eaa5fb77
tree6e0e551e9cd8d95811fb66bd2834aa2ac8a45254
parentc45c0b149065af0f0ed6b07da83075a022030403
util: Try finding out application name using dladdr if available

This fixes getting the binary name in the Hurd, or any other port using
the GNU C library, but only in the case where the library is directly
linked to. Opening with dlopen will not work.

Change in v3: reorder header includes and definitions
Change in v2: use a weak reference to main, so that we
don't crash when main cannot be found.
configure.ac
src/pulse/util.c