提交 f76e1831 编写于 作者: Á Árni Dagur 提交者: Rich Felker

add copy_file_range system call wrapper

上级 6ad514e4
...@@ -188,6 +188,7 @@ char *get_current_dir_name(void); ...@@ -188,6 +188,7 @@ char *get_current_dir_name(void);
int syncfs(int); int syncfs(int);
int euidaccess(const char *, int); int euidaccess(const char *, int);
int eaccess(const char *, int); int eaccess(const char *, int);
ssize_t copy_file_range(int, off_t *, int, off_t *, size_t, unsigned);
#endif #endif
#if defined(_LARGEFILE64_SOURCE) || defined(_GNU_SOURCE) #if defined(_LARGEFILE64_SOURCE) || defined(_GNU_SOURCE)
......
#define _GNU_SOURCE
#include <unistd.h>
#include "syscall.h"
ssize_t copy_file_range(int fd_in, off_t *off_in, int fd_out, off_t *off_out, size_t len, unsigned flags)
{
return syscall(SYS_copy_file_range, fd_in, off_in, fd_out, off_out, len, flags);
}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册