Commit 055cb3fc authored by Brad Smith's avatar Brad Smith Committed by Daniel Black

Rocksdb: Add initial OpenBSD support

parent 77951dd7
......@@ -188,7 +188,7 @@ ADD_DEPENDENCIES(rocksdb_aux_lib GenError)
# MARIAROCKS-TODO: how to properly depend on -lrt ?
TARGET_LINK_LIBRARIES(rocksdb_aux_lib rocksdblib ${ZLIB_LIBRARY})
if (UNIX AND NOT APPLE)
if (UNIX AND NOT APPLE AND NOT CMAKE_SYSTEM_NAME STREQUAL "OpenBSD")
TARGET_LINK_LIBRARIES(rocksdb_aux_lib -lrt)
endif()
TARGET_LINK_LIBRARIES(rocksdb_aux_lib ${ATOMIC_EXTRA_LIBS})
......@@ -259,7 +259,7 @@ ENDIF()
# ADD_SUBDIRECTORY(unittest)
#ENDIF()
if (UNIX AND NOT APPLE)
if (UNIX AND NOT APPLE AND NOT CMAKE_SYSTEM_NAME STREQUAL "OpenBSD")
SET(rocksdb_static_libs ${rocksdb_static_libs} "-lrt")
endif()
......
......@@ -260,7 +260,7 @@ Rdb_cf_manager cf_manager;
Rdb_ddl_manager ddl_manager;
Rdb_binlog_manager binlog_manager;
#if !defined(_WIN32) && !defined(__APPLE__)
#if !defined(_WIN32) && !defined(__APPLE__) && !defined(__OpenBSD__)
Rdb_io_watchdog *io_watchdog = nullptr;
#endif
/**
......@@ -844,7 +844,7 @@ static void rocksdb_set_io_write_timeout(
void *const var_ptr MY_ATTRIBUTE((__unused__)), const void *const save) {
DBUG_ASSERT(save != nullptr);
DBUG_ASSERT(rdb != nullptr);
#if !defined(_WIN32) && !defined(__APPLE__)
#if !defined(_WIN32) && !defined(__APPLE__) && !defined(__OpenBSD__)
DBUG_ASSERT(io_watchdog != nullptr);
#endif
......@@ -853,7 +853,7 @@ static void rocksdb_set_io_write_timeout(
const uint32_t new_val = *static_cast<const uint32_t *>(save);
rocksdb_io_write_timeout_secs = new_val;
#if !defined(_WIN32) && !defined(__APPLE__)
#if !defined(_WIN32) && !defined(__APPLE__) && !defined(__OpenBSD__)
io_watchdog->reset_timeout(rocksdb_io_write_timeout_secs);
#endif
RDB_MUTEX_UNLOCK_CHECK(rdb_sysvars_mutex);
......@@ -5768,7 +5768,7 @@ static int rocksdb_init_func(void *const p) {
directories.push_back(myrocks::rocksdb_wal_dir);
}
#if !defined(_WIN32) && !defined(__APPLE__)
#if !defined(_WIN32) && !defined(__APPLE__) && !defined(__OpenBSD__)
io_watchdog = new Rdb_io_watchdog(std::move(directories));
io_watchdog->reset_timeout(rocksdb_io_write_timeout_secs);
#endif
......@@ -5875,7 +5875,7 @@ static int rocksdb_done_func(void *const p) {
delete commit_latency_stats;
commit_latency_stats = nullptr;
#if !defined(_WIN32) && !defined(__APPLE__)
#if !defined(_WIN32) && !defined(__APPLE__) && !defined(__OpenBSD__)
delete io_watchdog;
io_watchdog = nullptr;
#endif
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment