Skip to content

Commit ef9e78c

Browse files
Oleksandr ByelkinOleksandr Byelkin
authored andcommitted
MDEV-14524 TokuDB is unable to be built on Linux
tokudb needs either F_NOCACHE or O_DIRECT, not both
1 parent 7be5b6f commit ef9e78c

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

storage/tokudb/CMakeLists.txt

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,17 @@ IF(CMAKE_VERSION VERSION_LESS "2.8.9")
44
MESSAGE(STATUS "CMake 2.8.9 or higher is required by TokuDB")
55
ELSEIF(CMAKE_SYSTEM_PROCESSOR STREQUAL "x86_64" OR
66
CMAKE_SYSTEM_PROCESSOR STREQUAL "amd64")
7-
# tokudb requires F_NOCACHE, O_DIRECT, and designated initializers
7+
# tokudb requires F_NOCACHE or O_DIRECT, and designated initializers
88
CHECK_CXX_SOURCE_COMPILES(
99
"
1010
#include <fcntl.h>
1111
struct a {int b; int c; };
1212
struct a d = { .b=1, .c=2 };
13-
int main() { return F_NOCACHE + O_DIRECT; }
13+
#if defined(O_DIRECT) || defined(F_NOCACHE)
14+
int main() { return 0; }
15+
#else
16+
#error
17+
#endif
1418
" TOKUDB_OK)
1519
ENDIF()
1620

0 commit comments

Comments
 (0)