mirror of
https://github.com/MariaDB/server.git
synced 2025-07-27 18:02:13 +03:00
Fix for UNIXWARE 7
Remove unaligned warnings on Ia64 from client library when using --host Fix for replication when using many file descriptors
This commit is contained in:
@ -1595,6 +1595,18 @@ mysql_connect(MYSQL *mysql,const char *host,
|
||||
#endif
|
||||
|
||||
|
||||
/*
|
||||
The following union is used to force a struct to be double allgined.
|
||||
This is to avoid warings with gethostname_r() on Linux itanium systems
|
||||
*/
|
||||
|
||||
typedef union
|
||||
{
|
||||
double tmp;
|
||||
char buff[GETHOSTBYNAME_BUFF_SIZE];
|
||||
} gethostbyname_buff;
|
||||
|
||||
|
||||
/*
|
||||
Note that the mysql argument must be initialized with mysql_init()
|
||||
before calling mysql_real_connect !
|
||||
@ -1766,8 +1778,8 @@ mysql_real_connect(MYSQL *mysql,const char *host, const char *user,
|
||||
{
|
||||
int tmp_errno;
|
||||
struct hostent tmp_hostent,*hp;
|
||||
char buff2[GETHOSTBYNAME_BUFF_SIZE];
|
||||
hp = my_gethostbyname_r(host,&tmp_hostent,buff2,sizeof(buff2),
|
||||
gethostbyname_buff buff2;
|
||||
hp = my_gethostbyname_r(host,&tmp_hostent,buff2.buff,sizeof(buff2),
|
||||
&tmp_errno);
|
||||
if (!hp)
|
||||
{
|
||||
|
Reference in New Issue
Block a user