Skip to content

Commit

Permalink
workaround for #783
Browse files Browse the repository at this point in the history
  • Loading branch information
DennisOSRM committed Dec 6, 2013
1 parent f55f8a3 commit e70485f
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions Tools/io-benchmark.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,11 @@ int main (int argc, char * argv[]) {
"starting up engines, " << g_GIT_DESCRIPTION << ", " <<
"compiled at " << __DATE__ << ", " __TIME__;

#ifdef __FreeBSD__
SimpleLogger().Write() << "Not supported on FreeBSD";
return 0;
#endif

if( 1 == argc ) {
SimpleLogger().Write(logWARNING) <<
"usage: " << argv[0] << " /path/on/device";
Expand Down Expand Up @@ -222,6 +227,12 @@ int main (int argc, char * argv[]) {
int ret1 = fseek(fd, current_offset, SEEK_SET);
int ret2 = read(fileno(fd), (char*)&single_block[0], 4096);
#endif

#ifdef __FreeBSD__
int ret1 = 0;
int ret2 = 0;
#endif

#ifdef __linux__
int ret1 = lseek(f, current_offset, SEEK_SET);
int ret2 = read(f, (char*)single_block, 4096);
Expand Down Expand Up @@ -281,6 +292,12 @@ int main (int argc, char * argv[]) {
int ret1 = fseek(fd, current_offset, SEEK_SET);
int ret2 = read(fileno(fd), (char*)&single_block, 4096);
#endif

#ifdef __FreeBSD__
int ret1 = 0;
int ret2 = 0;
#endif

#ifdef __linux__
int ret1 = lseek(f, current_offset, SEEK_SET);

Expand Down

0 comments on commit e70485f

Please sign in to comment.