test-getaddrinfo: avoid compilation failure on FreeBSD 7.2
authorJim Meyering <meyering@redhat.com>
Tue, 3 Nov 2009 07:53:23 +0000 (08:53 +0100)
committerJim Meyering <meyering@redhat.com>
Tue, 3 Nov 2009 07:53:23 +0000 (08:53 +0100)
* tests/test-getaddrinfo.c (simple): Test for EAI_NODATA only
if it is defined.

ChangeLog
tests/test-getaddrinfo.c

index 3dfebc5..239ec70 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2009-11-03  Jim Meyering  <meyering@redhat.com>
+
+       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  <ebb9@byu.net>
 
        mktime, timegm: share common declaration
index 384b98b..57c1a4d 100644 (file)
@@ -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));