aboutsummaryrefslogtreecommitdiff
path: root/lib/hook-functions.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/hook-functions.c')
-rw-r--r--lib/hook-functions.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/hook-functions.c b/lib/hook-functions.c
index 6d53a0d..2a8d618 100644
--- a/lib/hook-functions.c
+++ b/lib/hook-functions.c
@@ -127,11 +127,16 @@ end:
EXPORT
int substitute_hook_functions(const struct substitute_function_hook *hooks,
- size_t nhooks, int options) {
+ size_t nhooks,
+ struct substitute_function_hook_record **recordp,
+ int options) {
bool thread_safe = !(options & SUBSTITUTE_NO_THREAD_SAFETY);
if (thread_safe && !pthread_main_np())
return SUBSTITUTE_ERR_NOT_ON_MAIN_THREAD;
+ if (recordp)
+ *recordp = NULL;
+
struct execmem_foreign_write *fws;
struct hook_internal *his = malloc(nhooks * sizeof(*his) +
nhooks + sizeof(*fws));