summaryrefslogtreecommitdiff
path: root/dln.c
diff options
context:
space:
mode:
-rw-r--r--dln.c17
1 files changed, 17 insertions, 0 deletions
@@ -426,12 +426,29 @@ dln_sym(void *handle, const char *symbol)
}
#endif
void *
dln_load(const char *file)
{
#if defined(_WIN32) || defined(USE_DLN_DLOPEN)
void *handle = dln_open(file);
char *init_fct_name;
init_funcname(&init_fct_name, file);
void (*init_fct)(void) = (void(*)(void))dln_sym(handle, init_fct_name);