Description:
When compiling the source for MySQL 4.1.11 on Mac OS X 10.4, SOCKET_SIZE_TYPE is incorrectly set to int when it should be socklen_t. This causes the following compile error:
mysqld.cc: In function `void* handle_connections_sockets(void*)':
mysqld.cc:3589: error: invalid conversion from 'size_socket*' to 'socklen_t*'
mysqld.cc:3589: error: initializing argument 3 of 'int accept(int, sockaddr*, socklen_t*)'
mysqld.cc:3662: error: invalid conversion from 'size_socket*' to 'socklen_t*'
mysqld.cc:3662: error: initializing argument 3 of 'int getsockname(int, sockaddr*, socklen_t*)'
sql_list.h: At global scope:
sql_list.h:401: warning: inline function `base_ilist::~base_ilist()' used but never defined
make[4]: *** [mysqld.o] Error 1
make[3]: *** [all-recursive] Error 1
make[2]: *** [all] Error 2
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2
How to repeat:
On Mac OS X 10.4 with Xcode 2.0 installed,
unpack mysql 4.1.11 source
$ ./configure
$ make
Suggested fix:
By manually changing config.h as follows (after running ./configure), compiling will complete successfully.
Change line #951 of config.h
from:
/* The base type of the last arg to accept */
#define SET_SIZE_TYPE int
to:
/* The base type of the last arg to accept */
#define SET_SIZE_TYPE socklen_t
I do not have enough experience to submit a better fix.