Skip to content

Commit

Permalink
add hook
Browse files Browse the repository at this point in the history
  • Loading branch information
leiffyli committed Nov 7, 2016
1 parent b0f2306 commit d138835
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions co_hook_sys_call.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -822,6 +822,18 @@ struct hostent *gethostbyname(const char *name)
}


struct hostent* co_gethostbyname(const char *name);

struct hostent *gethostbyname(const char *name)
{
HOOK_SYS_FUNC( gethostbyname );
if (!co_is_enable_sys_hook())
{
return g_sys_gethostbyname_func(name);
}
return co_gethostbyname(name);
}

struct res_state_wrap
{
struct __res_state state;
Expand Down

0 comments on commit d138835

Please sign in to comment.