[PATCH 2/2] Bionic lacks tcdrain; provide a workaround
Matt Whitlock
busybox at mattwhitlock.name
Fri Apr 24 22:48:49 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 c768f11..1e2507d 100644
--- a/libbb/missing_syscalls.c
+++ b/libbb/missing_syscalls.c
@@ -39,6 +39,11 @@ 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
#ifndef HAVE_TTYNAME_R
--
2.0.5
More information about the busybox
mailing list