MySQL Lists are EOL. Please join:

List:General Discussion« Previous MessageNext Message »
From:Michael Widenius Date:March 14 1999 1:19pm
Subject:sql/ of 3.22.19b does not compile on Solaris 2.5.1
View as plain text  
>>>>> "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/ 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/

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/


We have the above define in 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!


sql/ of 3.22.19b does not compile on Solaris 2.5.1(Andreas Borchert)12 Mar
  • sql/ of 3.22.19b does not compile on Solaris 2.5.1Michael Widenius15 Mar