Add a check around when to funchook.
@@ -999,6 +999,7 @@ initHook()
dlclose(handle);
}
+ if (should_we_patch || g_fn.sendmmsg) {
funchook = funchook_create();
if (logLevel(g_log) <= CFG_LOG_DEBUG) {
@@ -1017,7 +1018,9 @@ initHook()
}
// sendmmsg for internal libc use in DNS queries
+ if (g_fn.sendmmsg) {
rc = funchook_prepare(funchook, (void**)&g_fn.sendmmsg, sendmmsg);
+ }
// hook 'em
rc = funchook_install(funchook, 0);
@@ -1029,6 +1032,7 @@ initHook()
return;
}
}
+}
#else
static void
initHook()
