Commit 1c3c72ce authored by Davi Arnaut's avatar Davi Arnaut

The FIONREAD macro could expand to a expression which

is invalid to preporcessor conditionals. Instead use
the autoconf generated macro to test the presence.
parent 891dffa3
...@@ -372,6 +372,7 @@ void vio_in_addr(Vio *vio, struct in_addr *in) ...@@ -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) static my_bool socket_poll_read(my_socket sd, uint timeout)
{ {
#ifdef __WIN__ #ifdef __WIN__
int res;
my_socket fd= sd; my_socket fd= sd;
fd_set readfds, errorfds; fd_set readfds, errorfds;
struct timeval tm; struct timeval tm;
...@@ -424,7 +425,7 @@ static my_bool socket_peek_read(Vio *vio, uint *bytes) ...@@ -424,7 +425,7 @@ static my_bool socket_peek_read(Vio *vio, uint *bytes)
return TRUE; return TRUE;
*bytes= len; *bytes= len;
return FALSE; return FALSE;
#elif FIONREAD #elif FIONREAD_IN_SYS_IOCTL
int len; int len;
if (ioctl(vio->sd, FIONREAD, &len) < 0) if (ioctl(vio->sd, FIONREAD, &len) < 0)
return TRUE; return TRUE;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment