diff --git a/test/regress_dns.c b/test/regress_dns.c index 9a3f88dc..75988a95 100644 --- a/test/regress_dns.c +++ b/test/regress_dns.c @@ -1218,7 +1218,14 @@ test_bufferevent_connect_hostname(void *arg) if (emfile) { success = BEV_EVENT_ERROR; +#ifdef __linux__ + /* on linux glibc/musl reports EAI_SYSTEM, when getaddrinfo() cannot + * open file for resolving service. */ default_error = EVUTIL_EAI_SYSTEM; +#else + /* on osx/freebsd it returns EAI_NONAME */ + default_error = EVUTIL_EAI_NONAME; +#endif } be_connect_hostname_base = data->base;