]> granicus.if.org Git - libevent/commitdiff
test/dns: in solaris under EMFILE the error is EAI_FAIL
authorAzat Khuzhin <azat@libevent.org>
Sun, 3 Feb 2019 15:54:00 +0000 (18:54 +0300)
committerAzat Khuzhin <azat@libevent.org>
Sun, 3 Feb 2019 15:58:41 +0000 (18:58 +0300)
(cherry picked from commit d234902da713cb722596f6bf66bb0dde8a3842dc)

test/regress_dns.c

index 75988a95592229a015529bffeb731bd8c4644d74..df696f0c96d249ae93a9002f53c24f8902ffb136 100644 (file)
@@ -1218,10 +1218,13 @@ test_bufferevent_connect_hostname(void *arg)
 
        if (emfile) {
                success = BEV_EVENT_ERROR;
-#ifdef __linux__
+#if defined(__linux__)
                /* on linux glibc/musl reports EAI_SYSTEM, when getaddrinfo() cannot
                 * open file for resolving service. */
                default_error = EVUTIL_EAI_SYSTEM;
+#elif defined(__sun__)
+               /* on solaris it returns EAI_FAIL */
+               default_error = EVUTIL_EAI_FAIL;
 #else
                /* on osx/freebsd it returns EAI_NONAME */
                default_error = EVUTIL_EAI_NONAME;