Commit 4e039a24 authored by Niels Möller's avatar Niels Möller

Use HAVE_IOCTL_FIONREAD.

parent 079459a5
2013-06-16 Niels Möller <nisse@lysator.liu.se> 2013-06-16 Niels Möller <nisse@lysator.liu.se>
* src/testsuite/tcpconnect.c (main): Check HAVE_IOCTL_FIONREAD.
* configure.ac: Updated liboop URL. * configure.ac: Updated liboop URL.
2012-08-23 Niels Möller <nisse@lysator.liu.se> 2012-08-23 Niels Möller <nisse@lysator.liu.se>
......
...@@ -285,9 +285,11 @@ main (int argc, char **argv) ...@@ -285,9 +285,11 @@ main (int argc, char **argv)
{ {
int nbytes, res; int nbytes, res;
#if HAVE_IOCTL_FIONREAD
if (ioctl (STDIN_FILENO, FIONREAD, &nbytes) < 0 if (ioctl (STDIN_FILENO, FIONREAD, &nbytes) < 0
|| nbytes <= 0 || nbytes <= 0
|| nbytes > (int) sizeof(buf_stdin)) || nbytes > (int) sizeof(buf_stdin))
#endif
nbytes = sizeof(buf_stdin); nbytes = sizeof(buf_stdin);
res = read(STDIN_FILENO, buf_stdin, nbytes); res = read(STDIN_FILENO, buf_stdin, nbytes);
......
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