From 47fba49a2622bb9af73a6fa2a0f6e2bef9e9f2f9 Mon Sep 17 00:00:00 2001 From: Micheal-Zhang-0111 <2519443269@qq.com> Date: Thu, 19 Dec 2024 11:56:23 +0800 Subject: [PATCH] solve Macos14.4.1(Intel) cmake compilation failed --- CMakeLists.txt | 1 + co_hook_sys_call.cpp | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) 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,