diff options
author | Brad Smith <brad@comstyle.com> | 2022-10-22 23:08:06 -0400 |
---|---|---|
committer | Daniel Black <daniel@mariadb.org> | 2022-10-26 15:33:10 +1100 |
commit | 055cb3fcd1aec2a05908a312a2ae4dfd3a0d4d81 (patch) | |
tree | 3947036fc7cf7e8c18c4458f6671e58e7cf36d1c | |
parent | 77951dd7102381385093209a1f2597d28e39900a (diff) | |
download | mariadb-git-055cb3fcd1aec2a05908a312a2ae4dfd3a0d4d81.tar.gz |
Rocksdb: Add initial OpenBSD support
-rw-r--r-- | storage/rocksdb/CMakeLists.txt | 4 | ||||
-rw-r--r-- | storage/rocksdb/ha_rocksdb.cc | 10 |
2 files changed, 7 insertions, 7 deletions
diff --git a/storage/rocksdb/CMakeLists.txt b/storage/rocksdb/CMakeLists.txt index e0c1003b461..9b7058a5348 100644 --- a/storage/rocksdb/CMakeLists.txt +++ b/storage/rocksdb/CMakeLists.txt @@ -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() diff --git a/storage/rocksdb/ha_rocksdb.cc b/storage/rocksdb/ha_rocksdb.cc index c38964680b1..cd366a12462 100644 --- a/storage/rocksdb/ha_rocksdb.cc +++ b/storage/rocksdb/ha_rocksdb.cc @@ -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 |