diff options
Diffstat (limited to 'usr.sbin/unbound/dynlibmod/dynlibmod.c')
-rw-r--r-- | usr.sbin/unbound/dynlibmod/dynlibmod.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/usr.sbin/unbound/dynlibmod/dynlibmod.c b/usr.sbin/unbound/dynlibmod/dynlibmod.c index 3bf9d1acb0b..ffac7ff306a 100644 --- a/usr.sbin/unbound/dynlibmod/dynlibmod.c +++ b/usr.sbin/unbound/dynlibmod/dynlibmod.c @@ -5,16 +5,16 @@ * module actions. */ #include "config.h" +#include "dynlibmod/dynlibmod.h" #include "util/module.h" #include "util/config_file.h" -#include "dynlibmod/dynlibmod.h" #if HAVE_WINDOWS_H #include <windows.h> #define __DYNMOD HMODULE #define __DYNSYM FARPROC #define __LOADSYM GetProcAddress -void log_dlerror() { +static void log_dlerror() { DWORD dwLastError = GetLastError(); LPSTR MessageBuffer; DWORD dwBufferLength; @@ -37,11 +37,11 @@ void log_dlerror() { } -HMODULE open_library(const char* fname) { +static HMODULE open_library(const char* fname) { return LoadLibrary(fname); } -void close_library(const char* fname, __DYNMOD handle) { +static void close_library(const char* fname, __DYNMOD handle) { (void)fname; (void)handle; } @@ -50,15 +50,15 @@ void close_library(const char* fname, __DYNMOD handle) { #define __DYNMOD void* #define __DYNSYM void* #define __LOADSYM dlsym -void log_dlerror() { +static void log_dlerror() { log_err("dynlibmod: %s", dlerror()); } -void* open_library(const char* fname) { +static void* open_library(const char* fname) { return dlopen(fname, RTLD_LAZY | RTLD_GLOBAL); } -void close_library(const char* fname, __DYNMOD handle) { +static void close_library(const char* fname, __DYNMOD handle) { if(!handle) return; if(dlclose(handle) != 0) { log_err("dlclose %s: %s", fname, strerror(errno)); @@ -212,10 +212,10 @@ size_t dynlibmod_get_mem(struct module_env* env, int id) { int dynlib_inplace_cb_reply_generic(struct query_info* qinfo, struct module_qstate* qstate, struct reply_info* rep, int rcode, struct edns_data* edns, struct edns_option** opt_list_out, - struct comm_reply* repinfo, struct regional* region, int id, - void* callback) { + struct comm_reply* repinfo, struct regional* region, + struct timeval* start_time, int id, void* callback) { struct cb_pair* cb_pair = (struct cb_pair*) callback; - return ((inplace_cb_reply_func_type*) cb_pair->cb)(qinfo, qstate, rep, rcode, edns, opt_list_out, repinfo, region, id, cb_pair->cb_arg); + return ((inplace_cb_reply_func_type*) cb_pair->cb)(qinfo, qstate, rep, rcode, edns, opt_list_out, repinfo, region, start_time, id, cb_pair->cb_arg); } int dynlib_inplace_cb_query_generic(struct query_info* qinfo, uint16_t flags, |