Patch for native networking code (IPv6)
Geoff Berry
gcb@cs.duke.edu
Thu Apr 8 13:15:00 GMT 1999
This patch fixes a typo and adds a missing check in the native
networking code that only cause problems if we HAVE_INET6.
Incidentally, has anyone gotten libgcj to compile on a glibc2.1 Debian
system?
1999-04-08 Geoff Berry <gcb@gnu.org>
* natInetAddress.cc (lookup): Fix typo (AF_INET16 -> AF_INET6).
* natPlainSocketImpl.cc (accept): Add missing else if check
for AF_INET6.
Index: libjava/java/net/natInetAddress.cc
===================================================================
RCS file: /cvs/java/libgcj/libjava/java/net/natInetAddress.cc,v
retrieving revision 1.1.1.1
diff -c -3 -p -b -r1.1.1.1 natInetAddress.cc
*** natInetAddress.cc 1999/04/07 14:52:40 1.1.1.1
--- natInetAddress.cc 1999/04/08 20:01:11
*************** java::net::InetAddress::lookup (jstring
*** 154,160 ****
else if (len == 16)
{
val = (char *) &chars;
! type = AF_INET16;
}
#endif /* HAVE_INET6 */
else
--- 154,160 ----
else if (len == 16)
{
val = (char *) &chars;
! type = AF_INET6;
}
#endif /* HAVE_INET6 */
else
Index: libjava/java/net/natPlainSocketImpl.cc
===================================================================
RCS file: /cvs/java/libgcj/libjava/java/net/natPlainSocketImpl.cc,v
retrieving revision 1.1.1.1
diff -c -3 -p -b -r1.1.1.1 natPlainSocketImpl.cc
*** natPlainSocketImpl.cc 1999/04/07 14:52:40 1.1.1.1
--- natPlainSocketImpl.cc 1999/04/08 20:01:11
*************** java::net::PlainSocketImpl::accept (java
*** 155,160 ****
--- 155,161 ----
rport = ntohs (u.address.sin_port);
}
#ifdef HAVE_INET6
+ else if (u.address.sin_family == AF_INET6)
{
raddr = JvNewByteArray (16);
memcpy (elements (raddr), &u.address6.sin6_addr, 16);
More information about the Java
mailing list