From 70c49dd70b22a27ad27e89ee6159aa2daba396f0 Mon Sep 17 00:00:00 2001 From: Jim Meyering Date: Tue, 3 Nov 2009 08:53:23 +0100 Subject: [PATCH] test-getaddrinfo: avoid compilation failure on FreeBSD 7.2 * tests/test-getaddrinfo.c (simple): Test for EAI_NODATA only if it is defined. --- ChangeLog | 6 ++++++ tests/test-getaddrinfo.c | 2 ++ 2 files changed, 8 insertions(+) diff --git a/ChangeLog b/ChangeLog index 3dfebc59c..239ec7002 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2009-11-03 Jim Meyering + + test-getaddrinfo: avoid compilation failure on FreeBSD 7.2 + * tests/test-getaddrinfo.c (simple): Test for EAI_NODATA only + if it is defined. + 2009-11-02 Eric Blake mktime, timegm: share common declaration diff --git a/tests/test-getaddrinfo.c b/tests/test-getaddrinfo.c index 384b98b6e..57c1a4d71 100644 --- a/tests/test-getaddrinfo.c +++ b/tests/test-getaddrinfo.c @@ -91,10 +91,12 @@ simple (char const *host, char const *service) fail the test merely because of this. */ if (res == EAI_SERVICE) return 0; +#ifdef EAI_NODATA /* AIX reports EAI_NODATA for "https". Don't fail the test merely because of this. */ if (res == EAI_NODATA) return 0; +#endif /* Provide details if errno was set. */ if (res == EAI_SYSTEM) dbgprintf ("system error: %s\n", strerror (err)); -- 2.11.0