Commit 94374351 authored by Niels Möller's avatar Niels Möller

Make use of FIONREAD conditional.

parent a828d22b
2013-06-16 Niels Mller <nisse@lysator.liu.se>
* src/testsuite/tcpconnect.c (main): Make use of FIONREAD
conditional on it being defined.
2013-06-15 Niels Mller <nisse@lysator.liu.se>
* configure.ac: Use AC_CONFIG_HEADER, not AM_CONFIG_HEADER.
......
......@@ -285,9 +285,11 @@ main (int argc, char **argv)
{
int nbytes, res;
#ifdef FIONREAD
if (ioctl (STDIN_FILENO, FIONREAD, &nbytes) < 0
|| nbytes <= 0
|| nbytes > (int) sizeof(buf_stdin))
#endif
nbytes = sizeof(buf_stdin);
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