Add __weak sync_file_range()
[fio.git] / helpers.c
... / ...
CommitLineData
1#include <stdlib.h>
2#include <errno.h>
3#include <sys/socket.h>
4#include <sys/time.h>
5#include <netinet/in.h>
6
7#include "compiler/compiler.h"
8#include "os/os.h"
9
10int __weak posix_fallocate(int fd, off_t offset, off_t len)
11{
12 return 0;
13}
14
15int __weak inet_aton(const char *cp, struct in_addr *inp)
16{
17 return 0;
18}
19
20int __weak clock_gettime(clockid_t clk_id, struct timespec *ts)
21{
22 struct timeval tv;
23 int ret;
24
25 ret = gettimeofday(&tv, NULL);
26
27 ts->tv_sec = tv.tv_sec;
28 ts->tv_nsec = tv.tv_usec * 1000;
29
30 return ret;
31}
32
33int __weak sync_file_range(int fd, off64_t offset, off64_t nbytes,
34 unsigned int flags)
35{
36 return 0;
37}