From 7ce8f52825e02803b075de4b17baf1d426e6dd63 Mon Sep 17 00:00:00 2001 From: yuesong-feng Date: Fri, 3 Dec 2021 10:34:49 +0800 Subject: [PATCH] fix a bug on macOS and FreeBSD platform --- co_hook_sys_call.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/co_hook_sys_call.cpp b/co_hook_sys_call.cpp index d41e4d4..5fe6a53 100644 --- a/co_hook_sys_call.cpp +++ b/co_hook_sys_call.cpp @@ -939,7 +939,8 @@ int gethostbyname_r(const char* __restrict name, HOOK_SYS_FUNC(gethostbyname_r); #if defined( __APPLE__ ) || defined( __FreeBSD__ ) - return g_sys_gethostbyname_r_func( name ); + return g_sys_gethostbyname_r_func(name, __result_buf, __buf, __buflen, + __result, __h_errnop); #else if (!co_is_enable_sys_hook()) { return g_sys_gethostbyname_r_func(name, __result_buf, __buf, __buflen,