>>>>> "Andreas" == Andreas Borchert <borchert@stripped>
> writes:
>> Description:
Andreas> We tried to compile the source distribution of MySQL on Solaris 2.5.1
Andreas> with our compilers from Sun (release 4.2). Everything went fine with
Andreas> the exception of sql/mysqld.cc that uses gethostname() without
Andreas> having a prototype for it.
Andreas> Prototypes for gethostname() are
Andreas> nowhere available in the include files below /usr/include, so
Andreas> you have to add either in some include file of your own or directly
Andreas> to sql/mysqld.cc:
Andreas> extern "C" int gethostname(char *name, int namelen);
>> How-To-Repeat:
Andreas> On Solaris 2.5.1:
Andreas> CC=cc CXX=CC ./configure && make
>> Fix:
Andreas> Just add ``extern "C" int gethostname(char *name, int namelen);''
Andreas> at a convenient location that becomes effective for sql/mysqld.cc.
Hi!
We have the above define in mysql.cc a time ago, but the problem is
that the above will conflict with gethostname() on other systems :(
For example on Linux the prototype is:
int gethostname(char *name, size_t len);
I have now added a prototype protected by 'ifdef SOLARIS' for this.
Please mail Sun a bug report about this so that they can fix their
header files!
Regards,
Monty