Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,9 @@ obj/crt/crt1_linux.o: qualcomm-software/crt/arm/crt1_linux.s

CRT_OBJS += obj/crt/crt1_linux.o
CRT_LIBS += lib/crt1_linux.o

EXCLUDED := obj/src/linux/copy_file_range.o
ALL_OBJS := $(filter-out $(EXCLUDED), $(ALL_OBJS))
endif
endif
# Qualcomm-specific code - end
Expand Down
3 changes: 3 additions & 0 deletions include/unistd.h
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,9 @@ char *get_current_dir_name(void);
int syncfs(int);
int euidaccess(const char *, int);
int eaccess(const char *, int);
#ifndef __QUIC_BAREMETAL
ssize_t copy_file_range(int, off_t *, int, off_t *, size_t, unsigned);
#endif // __QUIC_BAREMETAL
#endif

#if defined(_LARGEFILE64_SOURCE) || defined(_GNU_SOURCE)
Expand Down
8 changes: 8 additions & 0 deletions src/linux/copy_file_range.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#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);
}
Loading