mirror of
https://github.com/MariaDB/server.git
synced 2025-07-27 18:02:13 +03:00
Compatibility fix for BSDi.
BSDi uses size_t * for the optlen arg to getsockopt, while other Unixes use socklen_t *.
This commit is contained in:
@ -186,6 +186,9 @@
|
||||
/* Define as the base type of the last arg to accept */
|
||||
#undef SOCKET_SIZE_TYPE
|
||||
|
||||
/* Last argument to get/setsockopt */
|
||||
#undef SOCKOPT_OPTLEN_TYPE
|
||||
|
||||
#undef SPEED_T_IN_SYS_TYPES
|
||||
#undef SPRINTF_RETURNS_PTR
|
||||
#undef SPRINTF_RETURNS_INT
|
||||
|
@ -1175,6 +1175,11 @@ AC_C_BIGENDIAN
|
||||
#---START: Used in for client configure
|
||||
# Check base type of last arg to accept
|
||||
MYSQL_TYPE_ACCEPT
|
||||
case "$SYSTEM_TYPE" in
|
||||
*bsdi* ) AC_DEFINE_UNQUOTED(SOCKOPT_OPTLEN_TYPE, size_t);;
|
||||
* ) AC_DEFINE_UNQUOTED(SOCKOPT_OPTLEN_TYPE, size_socket);;
|
||||
esac
|
||||
|
||||
#---END:
|
||||
# Find where the stack goes
|
||||
MYSQL_STACK_DIRECTION
|
||||
|
@ -125,7 +125,7 @@ static int connect2(my_socket s, const struct sockaddr *name, uint namelen,
|
||||
return connect(s, (struct sockaddr*) name, namelen);
|
||||
#else
|
||||
int flags, res, s_err;
|
||||
size_socket s_err_size = sizeof(uint);
|
||||
SOCKOPT_OPTLEN_TYPE s_err_size = sizeof(uint);
|
||||
fd_set sfds;
|
||||
struct timeval tv;
|
||||
time_t start_time, now_time;
|
||||
|
@ -233,7 +233,7 @@ static int mc_sock_connect(my_socket s, const struct sockaddr *name,
|
||||
return connect(s, (struct sockaddr*) name, namelen);
|
||||
#else
|
||||
int flags, res, s_err;
|
||||
size_socket s_err_size = sizeof(uint);
|
||||
SOCKOPT_OPTLEN_TYPE s_err_size = sizeof(uint);
|
||||
fd_set sfds;
|
||||
struct timeval tv;
|
||||
|
||||
|
Reference in New Issue
Block a user