1 #include <stdlib.h>
2 #include <errno.h>
3 #include <sys/socket.h>
4 #include <sys/time.h>
5 #include <netinet/in.h>
6 #include <unistd.h>
7 
8 #include "compiler/compiler.h"
9 #include "arch/arch.h"
10 #include "os/os.h"
11 
12 #ifndef CONFIG_LINUX_FALLOCATE
fallocate(int fd,int mode,off_t offset,off_t len)13 int fallocate(int fd, int mode, off_t offset, off_t len)
14 {
15 	errno = ENOSYS;
16 	return -1;
17 }
18 #endif
19 
20 #ifndef CONFIG_POSIX_FALLOCATE
posix_fallocate(int fd,off_t offset,off_t len)21 int posix_fallocate(int fd, off_t offset, off_t len)
22 {
23 	return 0;
24 }
25 #endif
26 
27 #ifndef CONFIG_SYNC_FILE_RANGE
sync_file_range(int fd,off64_t offset,off64_t nbytes,unsigned int flags)28 int sync_file_range(int fd, off64_t offset, off64_t nbytes, unsigned int flags)
29 {
30 	errno = ENOSYS;
31 	return -1;
32 }
33 #endif
34 
35 #ifndef CONFIG_POSIX_FADVISE
posix_fadvise(int fd,off_t offset,off_t len,int advice)36 int posix_fadvise(int fd, off_t offset, off_t len, int advice)
37 {
38 	return 0;
39 }
40 #endif
41