From mboxrd@z Thu Jan 1 00:00:00 1970 From: Rainer Orth To: ro@gcc.gnu.org Cc: gcc-prs@gcc.gnu.org Subject: Re: libgcj/3694: natPlainDatagramSocketImpl.cc doesn't compile in ALPHA OSF1 Date: Fri, 27 Jul 2001 06:16:00 -0000 Message-id: <20010727131600.16167.qmail@sourceware.cygnus.com> X-SW-Source: 2001-07/msg00731.html List-Id: The following reply was made to PR libgcj/3694; it has been noted by GNATS. From: Rainer Orth To: tromey@redhat.com Cc: ake@purdue.edu, gcc-gnats@gcc.gnu.org, java-prs@gcc.gnu.org Subject: Re: libgcj/3694: natPlainDatagramSocketImpl.cc doesn't compile in ALPHA OSF1 Date: Fri, 27 Jul 2001 15:09:03 +0200 (MEST) Tom Tromey writes: > >>>>> "Rainer" == ro writes: > > Rainer> I don't know what to do about the mreq6 problem, since I > Rainer> don't have any V5.0/V5.0A machine. But I recall that while > Rainer> IPv6 was first introduced in V5.1, V5.0 had some of the types etc. > Rainer> mandated by the IPv6 extensions to the socket api. > > Is there some easy way we can detect this? > If we can detect the problem in configure (preferably without > referring to the host type) then we can simply disable IPv6. I happend to have a V5.0 CD lying around, and found what's going on: while (really: has a definition of struct sockaddr_in6 on V5.0 (although V5.1 was the first release to support IPv6 in the kernel, unless one used some IPv6 early access kit), which triggers the definition of HAVE_INET6 by configure.in, it lacks any definition of struct ipv6_mreq, which is protected by HAVE_INET6 in java/net/natPlainDatagramSocketImpl.cc. I think the obvious patch is to replace this by a test for HAVE_STRUCT_IPV6_MREQ in configure.in and using the result instead. The other instances of HAVE_INET6 only seem to use struct sockaddr_in6 and thus should be save; it's probably best to leave them as is, to allow for either the IPv6 EAK or running V5.0 binaries on V5.1 with IPv6 support enabled. I'll post a patch together with a fix for the socklen_t/accept problem once I've tested that part, but cannot check if the mreq6 problem is really fixed since I don't run V5.0 here. Rainer ----------------------------------------------------------------------------- Rainer Orth, Faculty of Technology, Bielefeld University Email: ro@TechFak.Uni-Bielefeld.DE