mirror of
https://github.com/MariaDB/server.git
synced 2026-05-15 03:17:20 +02:00
The FIONREAD macro could expand to a expression which
is invalid to preporcessor conditionals. Instead use the autoconf generated macro to test the presence.
This commit is contained in:
parent
ed800b5d77
commit
1f3b4018f9
1 changed files with 2 additions and 1 deletions
|
|
@ -372,6 +372,7 @@ void vio_in_addr(Vio *vio, struct in_addr *in)
|
|||
static my_bool socket_poll_read(my_socket sd, uint timeout)
|
||||
{
|
||||
#ifdef __WIN__
|
||||
int res;
|
||||
my_socket fd= sd;
|
||||
fd_set readfds, errorfds;
|
||||
struct timeval tm;
|
||||
|
|
@ -424,7 +425,7 @@ static my_bool socket_peek_read(Vio *vio, uint *bytes)
|
|||
return TRUE;
|
||||
*bytes= len;
|
||||
return FALSE;
|
||||
#elif FIONREAD
|
||||
#elif FIONREAD_IN_SYS_IOCTL
|
||||
int len;
|
||||
if (ioctl(vio->sd, FIONREAD, &len) < 0)
|
||||
return TRUE;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue