From 46aacc71141b0104c365793d1ac2040b4ac095b2 Mon Sep 17 00:00:00 2001 From: Marko Kreen Date: Mon, 12 Dec 2011 13:37:29 +0200 Subject: [PATCH] test_netdb: accept ENOSYS This allows the test to pass when no-op getaddrinfo is used. --- test/test_netdb.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/test/test_netdb.c b/test/test_netdb.c index af5b679..1921f71 100644 --- a/test/test_netdb.c +++ b/test/test_netdb.c @@ -29,7 +29,12 @@ static void test_gai(void *p) sev.sigev_notify_function = cb_func; res = getaddrinfo_a(GAI_NOWAIT, rlist, 1, &sev); - int_check(res, 0); + if (res == EAI_SYSTEM && errno == ENOSYS) { + /* ok - no impl */ + goto end; + } else { + int_check(res, 0); + } while (gai_error(&req) == EAI_INPROGRESS || gotres == 0) usleep(10000); -- 2.39.5