Commit f86413ec authored by David Carlier's avatar David Carlier Committed by Sergei Golubchik

Fix the build on OpenBSD (#488)

* rocksdb fails without timer_delete() - only use it when it exists
parent 14c2a9a5
...@@ -9,6 +9,11 @@ IF (NOT EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/rocksdb/Makefile") ...@@ -9,6 +9,11 @@ IF (NOT EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/rocksdb/Makefile")
SKIP_ROCKSDB_PLUGIN("Missing Makefile in rocksdb directory. Try \"git submodule update\".") SKIP_ROCKSDB_PLUGIN("Missing Makefile in rocksdb directory. Try \"git submodule update\".")
ENDIF() ENDIF()
CHECK_LIBRARY_EXISTS(rt timer_delete "" HAVE_TIMER_DELETE)
IF (HAVE_TIMER_DELETE)
ADD_DEFINITIONS(-DHAVE_TIMER_DELETE)
ENDIF(HAVE_TIMER_DELETE)
CHECK_FUNCTION_EXISTS(sched_getcpu HAVE_SCHED_GETCPU) CHECK_FUNCTION_EXISTS(sched_getcpu HAVE_SCHED_GETCPU)
IF(HAVE_SCHED_GETCPU) IF(HAVE_SCHED_GETCPU)
ADD_DEFINITIONS(-DHAVE_SCHED_GETCPU=1 -DROCKSDB_SCHED_GETCPU_PRESENT) ADD_DEFINITIONS(-DHAVE_SCHED_GETCPU=1 -DROCKSDB_SCHED_GETCPU_PRESENT)
......
...@@ -22,7 +22,7 @@ ...@@ -22,7 +22,7 @@
#include <vector> #include <vector>
/* Rdb_io_watchdog doesn't work on Windows [yet] */ /* Rdb_io_watchdog doesn't work on Windows [yet] */
#if !defined(_WIN32) && !defined(__APPLE__) #ifdef HAVE_TIMER_DELETE
namespace myrocks { namespace myrocks {
......
...@@ -35,7 +35,7 @@ ...@@ -35,7 +35,7 @@
namespace myrocks { namespace myrocks {
// Rdb_io_watchdog does not support Windows ATM. // Rdb_io_watchdog does not support Windows ATM.
#if !defined(_WIN32) && !defined(__APPLE__) #ifdef HAVE_TIMER_DELETE
class Rdb_io_watchdog { class Rdb_io_watchdog {
const int RDB_IO_WRITE_BUFFER_SIZE = 4096; const int RDB_IO_WRITE_BUFFER_SIZE = 4096;
......
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