From 48e6ff154a93da4083db447d3f4b408a2ede662b Mon Sep 17 00:00:00 2001 From: Michael Ortmann <41313082+michaelortmann@users.noreply.github.com> Date: Sun, 22 Nov 2020 17:43:26 +0000 Subject: [PATCH] Make compat explicit_bzero() available for modules --- src/mod/module.h | 3 +++ src/modules.c | 7 ++++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/src/mod/module.h b/src/mod/module.h index 6c473ac63..4ef0cb36d 100644 --- a/src/mod/module.h +++ b/src/mod/module.h @@ -510,6 +510,9 @@ #define make_rand_str_from_chars ((void (*) (char *, int, char *))global[308]) #define add_tcl_objcommands ((void (*) (tcl_cmds *))global[309]) #define pid_file ((char *)(global[310])) +#ifndef HAVE_EXPLICIT_BZERO +# define explicit_bzero ((void (*) (void *const, const size_t))global[311]) +#endif /* hostmasking */ diff --git a/src/modules.c b/src/modules.c index e1781bafa..e3055a464 100644 --- a/src/modules.c +++ b/src/modules.c @@ -611,7 +611,12 @@ Function global_table[] = { /* 308 - 311 */ (Function) make_rand_str_from_chars, (Function) add_tcl_objcommands, - (Function) pid_file /* char */ + (Function) pid_file, /* char */ +#ifndef HAVE_EXPLICIT_BZERO + (Function) explicit_bzero +#else + (Function) 0 +#endif }; void init_modules(void)