mirror of
https://github.com/MariaDB/server.git
synced 2025-01-29 02:05:57 +01:00
Fix the build on OpenBSD (#488)
* rocksdb fails without timer_delete() - only use it when it exists
This commit is contained in:
parent
14c2a9a52e
commit
f86413ecc1
3 changed files with 7 additions and 2 deletions
|
@ -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\".")
|
||||
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)
|
||||
IF(HAVE_SCHED_GETCPU)
|
||||
ADD_DEFINITIONS(-DHAVE_SCHED_GETCPU=1 -DROCKSDB_SCHED_GETCPU_PRESENT)
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
#include <vector>
|
||||
|
||||
/* Rdb_io_watchdog doesn't work on Windows [yet] */
|
||||
#if !defined(_WIN32) && !defined(__APPLE__)
|
||||
#ifdef HAVE_TIMER_DELETE
|
||||
|
||||
namespace myrocks {
|
||||
|
||||
|
|
|
@ -35,7 +35,7 @@
|
|||
namespace myrocks {
|
||||
|
||||
// Rdb_io_watchdog does not support Windows ATM.
|
||||
#if !defined(_WIN32) && !defined(__APPLE__)
|
||||
#ifdef HAVE_TIMER_DELETE
|
||||
|
||||
class Rdb_io_watchdog {
|
||||
const int RDB_IO_WRITE_BUFFER_SIZE = 4096;
|
||||
|
|
Loading…
Add table
Reference in a new issue