From 82d101b415a99d06fb724267d18c3be842ed2b1b Mon Sep 17 00:00:00 2001 From: Guillaume Cottenceau Date: Fri, 1 Jun 2001 14:22:41 +0000 Subject: slight modifs to get ppp and pppoe stuff compile better --- mdk-stage1/dietlibc/lib/tcflush.c | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 mdk-stage1/dietlibc/lib/tcflush.c (limited to 'mdk-stage1/dietlibc/lib/tcflush.c') diff --git a/mdk-stage1/dietlibc/lib/tcflush.c b/mdk-stage1/dietlibc/lib/tcflush.c new file mode 100644 index 000000000..a19fe11d1 --- /dev/null +++ b/mdk-stage1/dietlibc/lib/tcflush.c @@ -0,0 +1,23 @@ +#include +#include +#include + +#include + +extern int errno; + +/* Flush pending data on FD. */ +int tcflush(int fd, int queue_selector) +{ + switch (queue_selector) { + case TCIFLUSH: + return ioctl(fd, TCFLSH, 0); + case TCOFLUSH: + return ioctl(fd, TCFLSH, 1); + case TCIOFLUSH: + return ioctl(fd, TCFLSH, 2); + default: + errno = EINVAL; + return -1; + } +} -- cgit v1.2.1