This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: gcc-3.2 build problem in the java area
Andrew Haley <aph@redhat.com> writes:
> cyan@obrien.cc.rochester.edu writes:
>> ./../../../libjava/java/net/natInetAddress.cc: In static member function
>> `static java::lang::String* java::net::InetAddress::getLocalHostname()':
>> ../../../../libjava/java/net/natInetAddress.cc:338: `MAXHOSTNAMELEN'
>> undeclared
>> (first use this function)
>> ../../../../libjava/java/net/natInetAddress.cc:339: `buffer' undeclared
>> (first use this function)
>> make[5]: *** [java/net/natInetAddress.lo] Error 1
>>
>> I'm compiling on an E420R, Solaris 7, kernel Generic_106541-21.
> You should find this in /usr/include/netdb.h:
> #define MAXHOSTNAMELEN 256
> Is it there?
Solaris only defines MAXHOSTNAMELEN if:
#if !defined(_XPG4_2) || defined(__EXTENSIONS__)
Since this is C++, I'm guessing that it's including the headers in a more
strictly standard-conforming mode, which means that this #define is
omitted.
--
Russ Allbery (rra@stanford.edu) <http://www.eyrie.org/~eagle/>