[kaffe] EAI_NODATA deprecated

Mark Huizer xaa+kaffe at timewasters.nl
Wed Dec 31 05:58:02 PST 2003


It seems FreeBSD is one of the first to adopt, by changing their include
files in 5.x to start deprecating EAI_NODATA (so getaddrinfo() will
return EAI_NONAME in that case).

I suggest the following patch, that should work on any platform that
follows this RFC (dunno the exact number, sorry), and use this patch:

--- libraries/clib/net/InetAddressImpl.c.orig	Wed Dec 31 13:43:03 2003
+++ libraries/clib/net/InetAddressImpl.c	Wed Dec 31 13:43:09 2003
@@ -241,7 +241,9 @@
 			   "Unable to contact name server");
       break;
     case EAI_NONAME:
+#if defined(EAI_NODATA) && EAI_NODATA != EAI_NONAME
     case EAI_NODATA:
+#endif
       postExceptionMessage(&einfo,
 			   JAVA_NET(UnknownHostException),
 			   "Unknown host: %s",

This patch makes kaffe compile again on freebsd 5.x, I will test on 4.9
today if I have some time left before social duties jump in.

Mark
-- 
 There are two major products to come out of Berkeley: LSD and Unix
   Coincidence??							




More information about the kaffe mailing list