Commit 064a0798 authored by deuce's avatar deuce
Browse files

Use tcflush() rather than the ioctl.

parent c30f55fe
......@@ -183,15 +183,11 @@ BOOL comReadByte(COM_HANDLE handle, BYTE* ch)
BOOL comPurgeInput(COM_HANDLE handle)
{
int what = FREAD;
return(ioctl(handle, TIOCFLUSH, &what)==0);
return(tcflush(handle, TCIFLUSH)==0);
}
BOOL comPurgeOutput(COM_HANDLE handle)
{
int what = FWRITE;
return(ioctl(handle, TIOCFLUSH, &what)==0);
return(tcflush(handle, TCOFLUSH)==0);
}
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