File tree Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Original file line number Diff line number Diff line change
1
+ #ifdef __FreeBSD__
2
+ #pragma clang diagnostic ignored "-Wunreachable-code"
3
+ #endif
4
+
1
5
#include " util/exception.hpp"
2
6
#include " util/exception_utils.hpp"
3
7
#include " util/log.hpp"
9
13
#ifdef __linux__
10
14
#include < malloc.h>
11
15
#endif
16
+ #ifdef __FreeBSD__
17
+ #include < unistd.h>
18
+ #endif
12
19
13
20
#include < algorithm>
14
21
#include < filesystem>
@@ -89,6 +96,14 @@ int main(int argc, char *argv[])
89
96
TIMER_STOP (write_1gb);
90
97
fclose (fd);
91
98
#endif
99
+ #ifdef __FreeBSD__
100
+ int fd = open (test_path.string ().c_str (), O_WRONLY | O_CREAT | O_TRUNC | O_DIRECT, 0644 );
101
+ fcntl (fd, F_RDAHEAD, 0 );
102
+ TIMER_START (write_1gb);
103
+ write (fd, (char *)random_array, osrm::tools::NUMBER_OF_ELEMENTS * sizeof (unsigned ));
104
+ TIMER_STOP (write_1gb);
105
+ close (fd);
106
+ #endif
92
107
#ifdef __linux__
93
108
int file_desc =
94
109
open (test_path.string ().c_str (), O_CREAT | O_TRUNC | O_WRONLY | O_SYNC, S_IRWXU);
You can’t perform that action at this time.
0 commit comments