bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

EAI_NODATA used in test-getaddrinfo.c


From: Jim Meyering
Subject: EAI_NODATA used in test-getaddrinfo.c
Date: Mon, 02 Nov 2009 22:16:59 +0100

On Freebsd8-rc2 I saw this:

  test-getaddrinfo.c: In function 'simple':
  test-getaddrinfo.c:95: error: 'EAI_NODATA' undeclared (first use in this 
function)

lib/netdb.h was not generated.

Here's one way to fix it, but
I haven't dug enough yet to know if that's appropriate:

diff --git a/tests/test-getaddrinfo.c b/tests/test-getaddrinfo.c
index 384b98b..57c1a4d 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));




reply via email to

[Prev in Thread] Current Thread [Next in Thread]