[klibc] Fix the zapping of unused input on output operation

It is not supposed to happen, but if we are to discard any buffered
input on output operations, at least do it correctly.  This is
functionally equivalent to fseek(..., 0, SEEK_CUR); so implement it
that way.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2 files changed