diff --git a/CMakeLists.txt b/CMakeLists.txt index 04399a5..e1d2bc0 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -15,6 +15,7 @@ enable_language(C ASM) # Add source files set(SOURCE_FILES + co_comm.cpp co_epoll.cpp co_hook_sys_call.cpp co_routine.cpp diff --git a/co_hook_sys_call.cpp b/co_hook_sys_call.cpp index d41e4d4..4dc4c2e 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,