List:General Discussion« Previous MessageNext Message »
From:Michael Widenius Date:September 24 1999 8:39am
Subject:implicit declaration of function `int gethostname(...)'
View as plain text  
>>>>> "Ernie" == Ernie Oporto <eoporto@stripped> writes:

Ernie> Any idea what would cause the following when building 3.22.26a on a Solaris
Ernie> 2.5.1 building with gcc-2.95.1 and the latest binutils (2.7.2, I think).  I
Ernie> was able to build 3.22.25 with gcc-2.7 and was hoping to get a new and
Ernie> better set of compilers in place to make the newer mysql.

Ernie> c++ -DMYSQL_SERVER                      -DDEFAULT_MYSQL_HOME="\"/usr/local\"
Ernie> "  -DDATADIR="\"/usr/local/var\""                   -DSHAREDIR="\"/usr/local
Ernie> /share/mysql\""                         -DHAVE_CONFIG_H -I./../include      
Ernie>            -I./../regex                     -I. -I../include -I.. -I.    -O 
Ernie>   -fno-implicit-templates -DDBUG_OFF -c
Ernie> In function `int main(int, char **)':
Ernie> implicit declaration of function `int gethostname(...)'
Ernie> make[3]: *** [mysqld.o] Error 1
Ernie> make[3]: Leaving directory `/nb/local/src/mysql-3.22.26a/sql'
Ernie> make[2]: *** [all-recursive] Error 1
Ernie> make[2]: Leaving directory `/nb/local/src/mysql-3.22.26a/sql'
Ernie> make[1]: *** [all-recursive] Error 1
Ernie> make[1]: Leaving directory `/nb/local/src/mysql-3.22.26a'
Ernie> make: *** [all-recursive-am] Error 2

Ernie> ICQ-17933910  Ernie "Shokk" Oporto


Add the -DSOLARIS option to the above compile line or configure with:


The problem is that Solaris 2.5.1 doesn't declare gethostname() in any 
include files. (This is a bug in Solaris 2.5.1)

implicit declaration of function `int gethostname(...)'Ernie Oporto24 Sep
  • implicit declaration of function `int gethostname(...)'Michael Widenius24 Sep