mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-10-29 05:40:23 -04:00
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.
This commit is contained in:
parent
c45c0b1490
commit
93c698c9fc
2 changed files with 25 additions and 0 deletions
|
|
@ -580,6 +580,8 @@ AC_SYS_LARGEFILE
|
|||
# Check for open64 to know if the current system does have open64() and similar functions
|
||||
AC_CHECK_FUNCS_ONCE([open64])
|
||||
|
||||
AC_SEARCH_LIBS([dladdr], [dl], [HAVE_DLADDR=1], [HAVE_DLADDR=0])
|
||||
AC_DEFINE(HAVE_DLADDR, [1], [Have dladdr?])
|
||||
|
||||
###################################
|
||||
# External libraries #
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue