add linux tee syscall

This commit is contained in:
Rich Felker 2012-09-08 01:03:01 -04:00
parent 00e6bbcc05
commit 997ba92a0f
2 changed files with 9 additions and 0 deletions

View File

@ -130,6 +130,7 @@ ssize_t readahead(int, off_t, size_t);
int sync_file_range(int, off_t, off_t, unsigned); int sync_file_range(int, off_t, off_t, unsigned);
ssize_t vmsplice(int, const struct iovec *, size_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 splice(int, off_t *, int, off_t *, size_t, unsigned);
ssize_t tee(int, int, size_t, unsigned);
#define loff_t off_t #define loff_t off_t
#endif #endif

8
src/linux/tee.c Normal file
View File

@ -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);
}