summaryrefslogtreecommitdiff
path: root/dynlibmod/examples
diff options
context:
space:
mode:
authorCy Schubert <cy@FreeBSD.org>2021-02-09 20:59:02 +0000
committerCy Schubert <cy@FreeBSD.org>2021-02-09 20:59:02 +0000
commitd60fa10fd872db7e3d8cb1e161cfdae026c43b14 (patch)
treee19b79c68276ce72fabece9595abbdd5e6378eb0 /dynlibmod/examples
parent072fbfa38b24d202f4eac875ad2f93531dad7f7e (diff)
Vendor import of Unbound 1.13.1.vendor/unbound/1.13.1
Diffstat (limited to 'dynlibmod/examples')
-rw-r--r--dynlibmod/examples/helloworld.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/dynlibmod/examples/helloworld.c b/dynlibmod/examples/helloworld.c
index acb6b5d9bda6..be21168430a7 100644
--- a/dynlibmod/examples/helloworld.c
+++ b/dynlibmod/examples/helloworld.c
@@ -7,8 +7,10 @@
* And to build for windows, first make unbound with the --with-dynlibmod
* switch, then use this command:
* x86_64-w64-mingw32-gcc -m64 -I../.. -shared -Wall -Werror -fpic
- * -o helloworld.dll helloworld.c -L../.. -l:libunbound.a
- * to cross-compile a 64-bit Windows DLL.
+ * -o helloworld.dll helloworld.c -L../.. -l:libunbound.dll.a
+ * to cross-compile a 64-bit Windows DLL. The libunbound.dll.a is produced
+ * by the compile step that makes unbound.exe and allows the dynlib dll to
+ * access definitions in unbound.exe.
*/
#include "../../config.h"
@@ -30,8 +32,8 @@
int reply_callback(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);
/* Init is called when the module is first loaded. It should be used to set up
* the environment for this module and do any other initialisation required. */
@@ -116,8 +118,8 @@ EXPORT size_t get_mem(struct module_env* env, int id) {
int reply_callback(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) {
log_info("dynlib: hello world from callback");
struct dynlibmod_env* env = qstate->env->modinfo[id];
if (env->dyn_env != NULL) {