From 93b98ff5726fd620e1f123d04072b956412c1b55 Mon Sep 17 00:00:00 2001 From: Matt Whitlock Date: Sun, 26 Apr 2015 13:14:50 +0200 Subject: Bionic lacks tcdrain; provide a workaround Signed-off-by: Matt Whitlock Signed-off-by: Denys Vlasenko --- libbb/missing_syscalls.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'libbb') diff --git a/libbb/missing_syscalls.c b/libbb/missing_syscalls.c index dd430e3e2..e3c1e924b 100644 --- a/libbb/missing_syscalls.c +++ b/libbb/missing_syscalls.c @@ -39,4 +39,9 @@ int pivot_root(const char *new_root, const char *put_old) { return syscall(__NR_pivot_root, new_root, put_old); } + +int tcdrain(int fd) +{ + return ioctl(fd, TCSBRK, 1); +} #endif -- cgit v1.2.3