diff --git a/lib_fiber/c/src/hook/dns_init.c b/lib_fiber/c/src/hook/dns_init.c index 9839d229e..9d58c2f60 100644 --- a/lib_fiber/c/src/hook/dns_init.c +++ b/lib_fiber/c/src/hook/dns_init.c @@ -9,7 +9,7 @@ struct dns_resolv_conf *var_dns_conf = NULL; struct dns_hosts *var_dns_hosts = NULL; struct dns_hints *var_dns_hints = NULL; -void dns_set_read_wait(int timeout) +void fiber_dns_set_read_wait(int timeout) { set_read_timeout(timeout); } @@ -32,7 +32,7 @@ static void dns_on_exit(void) } } -void dns_init(void) +void fiber_dns_init(void) { #ifdef SYS_WIN static pthread_mutex_t __lock; diff --git a/lib_fiber/c/src/hook/getaddrinfo.c b/lib_fiber/c/src/hook/getaddrinfo.c index a4b33590e..c8a4d6c8f 100644 --- a/lib_fiber/c/src/hook/getaddrinfo.c +++ b/lib_fiber/c/src/hook/getaddrinfo.c @@ -149,7 +149,7 @@ int acl_fiber_getaddrinfo(const char *node, const char *service, } if (var_dns_conf == NULL || var_dns_hosts == NULL) { - dns_init(); + fiber_dns_init(); } *res = NULL; diff --git a/lib_fiber/c/src/hook/gethostbyname.c b/lib_fiber/c/src/hook/gethostbyname.c index d03401840..250ca1e70 100644 --- a/lib_fiber/c/src/hook/gethostbyname.c +++ b/lib_fiber/c/src/hook/gethostbyname.c @@ -170,7 +170,7 @@ int acl_fiber_gethostbyname_r(const char *name, struct hostent *ent, } if (var_dns_conf == NULL || var_dns_hosts == NULL) { - dns_init(); + fiber_dns_init(); } memset(ent, 0, sizeof(struct hostent)); diff --git a/lib_fiber/c/src/hook/hook.h b/lib_fiber/c/src/hook/hook.h index a1d051e01..aa957f2f4 100644 --- a/lib_fiber/c/src/hook/hook.h +++ b/lib_fiber/c/src/hook/hook.h @@ -5,7 +5,7 @@ extern struct dns_resolv_conf *var_dns_conf; extern struct dns_hosts *var_dns_hosts; extern struct dns_hints *var_dns_hints; -extern void dns_set_read_wait(int timeout); -extern void dns_init(void); +extern void fiber_dns_set_read_wait(int timeout); +extern void fiber_dns_init(void); #endif