diff --git a/src/iofunc.c b/src/iofunc.c index cdaa662f6..dc0c1937f 100644 --- a/src/iofunc.c +++ b/src/iofunc.c @@ -1339,10 +1339,14 @@ static int read_string_generic(hamlib_port_t *p, */ do { - // The ioctl works on Linux but not mingw -- enable in 4.6 for non-mingw builds and see if it breaks anything - //int avail=0; - //ioctl(p->fd, FIONREAD, &avail); +#if 0 +#ifndef __MINGW32__ + // The ioctl works on Linux but not mingw + int avail=0; + ioctl(p->fd, FIONREAD, &avail); //rig_debug(RIG_DEBUG_ERR, "xs: avail=%d expected_len=%d, minlen=%d, direct=%d\n", __func__, avail, expected_len, minlen, direct); +#endif +#endif rd_count = port_read_generic(p, &rxbuffer[total_count], expected_len == 1 ? 1 : minlen, direct); rig_debug(RIG_DEBUG_VERBOSE, "%s: read %d bytes\n", __func__, (int)rd_count);