add linux tee syscall
authorRich Felker <dalias@aerifal.cx>
Sat, 8 Sep 2012 05:03:01 +0000 (01:03 -0400)
committerRich Felker <dalias@aerifal.cx>
Sat, 8 Sep 2012 05:03:01 +0000 (01:03 -0400)
include/fcntl.h
src/linux/tee.c [new file with mode: 0644]

index cfdccd9bc429dc01f4a77920572975c6b803d98a..cbaec5dae87559babdf1633a89ecf1f680b1a8a1 100644 (file)
@@ -130,6 +130,7 @@ ssize_t readahead(int, off_t, size_t);
 int sync_file_range(int, off_t, off_t, unsigned);
 ssize_t vmsplice(int, const struct iovec *, size_t, unsigned);
 ssize_t splice(int, off_t *, int, off_t *, size_t, unsigned);
+ssize_t tee(int, int, size_t, unsigned);
 #define loff_t off_t
 #endif
 
diff --git a/src/linux/tee.c b/src/linux/tee.c
new file mode 100644 (file)
index 0000000..a24748c
--- /dev/null
@@ -0,0 +1,8 @@
+#define _GNU_SOURCE
+#include <fcntl.h>
+#include "syscall.h"
+
+ssize_t tee(int src, int dest, size_t len, unsigned flags)
+{
+       return syscall(SYS_tee, src, dest, len, flags);
+}