This helps prevent symbol collisions with other programs and libraries. In particular,
because PAM modules are loaded into the process that is creating the session, and
elogind creates PAM sessions, the potential for collisions is high.
Disambiguate all elogind calls by tagging a 'version' SD_SHARED.
Fixes #6624
libselinux]
#endif // 0
+libshared_sym_path = '@0@/libshared.sym'.format(meson.current_source_dir())
+
libshared = shared_library(
libshared_name,
shared_sources,
libelogind_internal_sources,
#endif // 0
include_directories : includes,
- link_args : ['-shared'],
+ link_args : ['-shared',
+ '-Wl,--version-script=' + libshared_sym_path],
c_args : ['-fvisibility=default'],
dependencies : libshared_deps,
install : true,