Make weak posix_memalign() private to Solaris
[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
9 int __weak posix_fallocate(int fd, off_t offset, off_t len)
10 {
11         return 0;
12 }
13
14 int __weak inet_aton(const char *cp, struct in_addr *inp)
15 {
16         return 0;
17 }
18
19 int __weak clock_gettime(clockid_t clk_id, struct timespec *ts)
20 {
21         struct timeval tv;
22         int ret;
23
24         ret = gettimeofday(&tv, NULL);
25
26         ts->tv_sec = tv.tv_sec;
27         ts->tv_nsec = tv.tv_usec * 1000;
28
29         return ret;
30 }