#include "gw-config.h"
#include "gwlib.h"
#include <dlfcn.h>
Go to the source code of this file.
◆ gw_dlopen_get_symbol()
int gw_dlopen_get_symbol |
( |
const char * |
lib_path, |
|
|
const char * |
name, |
|
|
void ** |
result |
|
) |
| |
Definition at line 70 of file gw-dlopen.c.
References debug(), error(), and name.
Referenced by smsc_http_create().
72 void *dl_handle, *addr;
77 dl_handle = dlopen(lib_path, RTLD_NOW | RTLD_LOCAL);
80 error(0,
"error opening shared library `%s': %s", (lib_path == NULL ?
"" : lib_path), err);
84 debug(
"gw_dlopen", 0,
"shared library `%s' opened", (lib_path == NULL ?
"" : lib_path));
86 addr = dlsym(dl_handle,
name);
88 error(0,
"error find name in shared library `%s': %s", (lib_path == NULL ?
"" : lib_path), dlerror());
void error(int err, const char *fmt,...)
void debug(const char *place, int err, const char *fmt,...)