mirror of
https://github.com/matrix-construct/construct
synced 2024-12-26 15:33:54 +01:00
ircd::mods: Add preconditions around dlsym hook inclusion.
This commit is contained in:
parent
84ed175ffe
commit
542f8f421a
1 changed files with 11 additions and 0 deletions
11
ircd/mods.cc
11
ircd/mods.cc
|
@ -47,12 +47,23 @@ ircd::mods::autoload
|
|||
extern "C" void *
|
||||
__libc_dlsym(void *, const char *);
|
||||
|
||||
#ifdef IRCD_MODS_HOOK_DLSYM
|
||||
extern "C" void *
|
||||
dlsym(void *const handle,
|
||||
const char *const symbol)
|
||||
{
|
||||
#ifdef RB_DEBUG_MODS_HOOK_DLSYM
|
||||
ircd::log::debug
|
||||
{
|
||||
ircd::mods::log, "handle:%p symbol lookup '%s'",
|
||||
handle,
|
||||
symbol
|
||||
};
|
||||
#endif
|
||||
|
||||
return __libc_dlsym(handle, symbol);
|
||||
}
|
||||
#endif
|
||||
|
||||
//
|
||||
// mods::mod
|
||||
|
|
Loading…
Reference in a new issue