Line 0
Link Here
|
|
|
1 |
--- ioping.c.orig 2013-02-02 21:00:59.000000000 +0400 |
2 |
+++ ioping.c 2013-07-23 15:53:52.000000000 +0400 |
3 |
@@ -154,11 +154,6 @@ |
4 |
return FlushFileBuffers(h) ? 0 : -1; |
5 |
} |
6 |
|
7 |
-int fdatasync(int fd) |
8 |
-{ |
9 |
- return fsync(fd); |
10 |
-} |
11 |
- |
12 |
void srandom(unsigned int seed) |
13 |
{ |
14 |
srand(seed); |
15 |
@@ -178,6 +173,13 @@ |
16 |
|
17 |
#endif /* __MINGW32__ */ |
18 |
|
19 |
+#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__MINGW32__) |
20 |
+int fdatasync(int fd) |
21 |
+{ |
22 |
+ return fsync(fd); |
23 |
+} |
24 |
+#endif /* (__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__MINGW32__) */ |
25 |
+ |
26 |
#ifndef HAVE_POSIX_MEMALIGN |
27 |
/* don't free it */ |
28 |
int posix_memalign(void **memptr, size_t alignment, size_t size) |
29 |
@@ -222,7 +224,7 @@ |
30 |
|
31 |
void version(void) |
32 |
{ |
33 |
- fprintf(stderr, "ioping %s\n", VERSION); |
34 |
+ fprintf(stderr, "ioping %f\n", VERSION); |
35 |
} |
36 |
|
37 |
struct suffix { |