Hi Dalibor,

On Mon, 2007-06-25 at 02:07 +0200, Dalibor Topic wrote:
> the attached patch largely fixes the build on cygwin, and lets IPv6 
> dependant code only be built if we find IPv6 facilities.
> [...]
>          * native/jni/native-lib/cpnet.c
>          (cpnet_getHostByName, cpnet_getHostByAddr) Build IPv6 dependant
>          code conditionally on IPv6 facilities being available.
>          (cpnet_aton) Moved variable declaration of inet6_addr to the scope
>          of its use. Build IPv6 dependant code conditionally
>          on IPv6 facilities being available.

This broke the build (bad Dalibor!), because the variable declaration
was moved just after the first usage. Moved it back (and guarded it with
the new HAVE_INET6 define.

2007-06-25  Mark Wielaard  <[EMAIL PROTECTED]>

        * native/jni/native-lib/cpnet.c
        (cpnet_aton) Moved variable declaration of inet6_addr so it is
        actually in the scope of its use.

Committed,

Mark

diff -u -r1.9 cpnet.c
--- native/jni/native-lib/cpnet.c       25 Jun 2007 00:05:33 -0000      1.9
+++ native/jni/native-lib/cpnet.c       25 Jun 2007 09:41:54 -0000
@@ -767,6 +767,10 @@
 {
   jbyte *bytes = NULL;
 
+#if defined(HAVE_INET_PTON) && defined(HAVE_INET6)
+  jbyte inet6_addr[16];
+#endif
+
 #ifdef HAVE_INET_ATON
   struct in_addr laddr;
   if (inet_aton (hostname, &laddr))
@@ -793,8 +797,6 @@
 #if defined(HAVE_INET_PTON) && defined(HAVE_INET6)
   if (inet_pton (AF_INET6, hostname, inet6_addr) > 0)
     {
-      jbyte inet6_addr[16];
-
       *addr = cpnet_newIPV6Address(env);
       cpnet_bytesToIPV6Address(*addr, inet6_addr);
       return 0;

Attachment: signature.asc
Description: This is a digitally signed message part

Reply via email to