[PATCH 4/5] Bionic lacks tcdrain; provide a workaround

Matt Whitlock busybox at mattwhitlock.name
Fri Apr 24 08:12:21 UTC 2015


---
 libbb/missing_syscalls.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/libbb/missing_syscalls.c b/libbb/missing_syscalls.c
index dd430e3..e3c1e92 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
-- 
2.0.5



More information about the busybox mailing list