Skip to content

Commit

Permalink
Fix windows build after refactoring
Browse files Browse the repository at this point in the history
  Missing and duplicate files in CMake
  Missing definition of port::Crash
  • Loading branch information
yuslepukhin committed Jul 22, 2015
1 parent 3dbf4ba commit ac5e441
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 1 deletion.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,7 @@ set(SOURCES
util/env_hdfs.cc
util/event_logger.cc
util/file_util.cc
util/file_reader_writer.cc
util/filter_policy.cc
util/hash.cc
util/hash_cuckoo_rep.cc
Expand Down Expand Up @@ -254,7 +255,6 @@ set(TESTS
db/corruption_test.cc
db/cuckoo_table_db_test.cc
db/db_iter_test.cc
db/db_log_iter_test.cc
db/db_test.cc
db/db_compaction_filter_test.cc
db/db_compaction_test.cc
Expand Down
7 changes: 7 additions & 0 deletions port/win/port_win.cc
Original file line number Diff line number Diff line change
Expand Up @@ -227,6 +227,13 @@ int truncate(const char* path, int64_t len) {
return result;
}

void Crash(const std::string& srcfile, int srcline) {
fprintf(stdout, "Crashing at %s:%d\n", srcfile.c_str(), srcline);
fflush(stdout);
abort();
}


} // namespace port
} // namespace rocksdb

Expand Down
1 change: 1 addition & 0 deletions port/win/port_win.h
Original file line number Diff line number Diff line change
Expand Up @@ -554,6 +554,7 @@ inline void* pthread_getspecific(pthread_key_t key) {
// using C-runtime to implement. Note, this does not
// feel space with zeros in case the file is extended.
int truncate(const char* path, int64_t length);
void Crash(const std::string& srcfile, int srcline);

} // namespace port

Expand Down

0 comments on commit ac5e441

Please sign in to comment.