All pastes #50297 Raw Edit

Untitled

public text v1 · immutable
#50297 ·published 2006-04-20 23:11 UTC
rendered paste body
Index: serial.c
===================================================================
--- serial.c    (revision 59717)
+++ serial.c    (working copy)
@@ -118,7 +118,7 @@
        gint32 retval;
 
        *error = 0;
-       if (ioctl (fd, input ? TIOCINQ : TIOCOUTQ, &retval) == -1) {
+       if (ioctl (fd, input ? FIONREAD : FIONWRITE, &retval) == -1) {
                *error = -1;
                return -1;
        }