Bug #7384 listener.cc fails to compile on Solaris (INADDR_NONE undeclared)
Submitted: 17 Dec 2004 17:13 Modified: 20 Dec 2004 16:18
Reporter: Lenz Grimmer Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Compiling Severity:S1 (Critical)
Version:5.0.3-pre OS:Solaris (Solaris (x86/sparc))
Assigned to: Petr Chardin CPU Architecture:Any

[17 Dec 2004 17:13] Lenz Grimmer
Description:
On all our Solaris build machines, the compilation of listener.cc fails with the following error message:

06494: if gcc -DMYSQL_INSTANCE_MANAGER -DMYSQL_SERVER -I. -I. -I../.. -I../../include -I../../extra    -g -O -DSAFE_MUTEX -O3 -fno-omit-frame-pointer -felide-constructors -fno-exceptions -fno-rtti   -fno-implicit-templates -fno-exceptions -fno-rtti -DUSE_MYSYS_NEW -DDEFINE_CXA_PURE_VIRTUAL -D_FILE_OFFSET_BITS=64 -DHAVE_RWLOCK_T -MT listener.o -MD -MP -MF ".deps/listener.Tpo" -c -o listener.o listener.cc; \
06495: then mv -f ".deps/listener.Tpo" ".deps/listener.Po"; else rm -f ".deps/listener.Tpo"; exit 1; fi
06496: listener.cc: In member function `void Listener_thread::run()':
06497: listener.cc:102: error: `INADDR_NONE' undeclared (first use this function)
06498: listener.cc:102: error: (Each undeclared identifier is reported only once for 
06499:    each function it appears in.)
06500: gmake[3]: *** [listener.o] Error 1
06501: gmake[3]: Leaving directory `/export/home/mysqldev/sunfire100b/mysql-5.0.3-alpha/server-tools/instance-manager'

How to repeat:
Compile listener.cc on Solaris, observe the error.
[20 Dec 2004 16:18] Petr Chardin
Thank you for your bug report. This issue has been committed to our
source repository of that product and will be incorporated into the
next release.

If necessary, you can access the source repository and build the latest
available version, including the bugfix, yourself. More information 
about accessing the source trees is available at
    http://www.mysql.com/doc/en/Installing_source_tree.html

Additional info:

Solaris doesn't define INADDR_NONE. The definition was moved from mysqld.cc and client.c to the my_net.h to solve the problem with listener.cc and avoid such problems in future.