Allow 'b' postfix for integer values
[fio.git] / helpers.c
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
10 int __weak posix_fallocate(int fd, off_t offset, off_t len)
11 {
12         return 0;
13 }
14
15 int __weak inet_aton(const char *cp, struct in_addr *inp)
16 {
17         return 0;
18 }
19
20 int __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 }