diff --git a/legacy/eina/src/lib/eina_module.c b/legacy/eina/src/lib/eina_module.c index 5f2ea02a95..0bf8bb8171 100644 --- a/legacy/eina/src/lib/eina_module.c +++ b/legacy/eina/src/lib/eina_module.c @@ -450,11 +450,11 @@ EAPI const char * eina_module_file_get(const Eina_Module *m) EAPI char *eina_module_symbol_path_get(const void *symbol, const char *sub_dir) { - EINA_SAFETY_ON_NULL_RETURN_VAL(symbol, NULL); - #ifdef HAVE_DLADDR Dl_info eina_dl; + EINA_SAFETY_ON_NULL_RETURN_VAL(symbol, NULL); + if (dladdr(symbol, &eina_dl)) { if (strrchr(eina_dl.dli_fname, '/'))