Skip to content

Commit

Permalink
MDEV-14524 TokuDB is unable to be built on Linux
Browse files Browse the repository at this point in the history
tokudb needs either F_NOCACHE or O_DIRECT, not both
  • Loading branch information
Oleksandr Byelkin authored and Oleksandr Byelkin committed Dec 14, 2017
1 parent 7be5b6f commit ef9e78c
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions storage/tokudb/CMakeLists.txt
Expand Up @@ -4,13 +4,17 @@ IF(CMAKE_VERSION VERSION_LESS "2.8.9")
MESSAGE(STATUS "CMake 2.8.9 or higher is required by TokuDB")
ELSEIF(CMAKE_SYSTEM_PROCESSOR STREQUAL "x86_64" OR
CMAKE_SYSTEM_PROCESSOR STREQUAL "amd64")
# tokudb requires F_NOCACHE, O_DIRECT, and designated initializers
# tokudb requires F_NOCACHE or O_DIRECT, and designated initializers
CHECK_CXX_SOURCE_COMPILES(
"
#include <fcntl.h>
struct a {int b; int c; };
struct a d = { .b=1, .c=2 };
int main() { return F_NOCACHE + O_DIRECT; }
#if defined(O_DIRECT) || defined(F_NOCACHE)
int main() { return 0; }
#else
#error
#endif
" TOKUDB_OK)
ENDIF()

Expand Down

0 comments on commit ef9e78c

Please sign in to comment.