From 92b1a68d872729f15fe399931498003d29cc3bcb Mon Sep 17 00:00:00 2001 From: Zhongyi Xie Date: Mon, 5 Mar 2018 11:10:38 -0800 Subject: [PATCH] fix FreeBSD build Summary: Currently FreeBSD build is broken in master and possibly some previous releases due to unrecognized symbol `O_DIRECT`. This PR will fix the build on FreeBSD Closes https://github.com/facebook/rocksdb/pull/3560 Differential Revision: D7148646 Pulled By: miasantreble fbshipit-source-id: 95b6c3d310fa531267c086b2cd40a5ab1c042b5a --- env/env_test.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/env/env_test.cc b/env/env_test.cc index 2360a5e8b..4f35f5a65 100644 --- a/env/env_test.cc +++ b/env/env_test.cc @@ -1143,7 +1143,7 @@ TEST_P(EnvPosixTestWithParam, Preallocation) { unique_ptr srcfile; EnvOptions soptions; soptions.use_direct_reads = soptions.use_direct_writes = direct_io_; -#if !defined(OS_MACOSX) && !defined(OS_WIN) && !defined(OS_SOLARIS) && !defined(OS_AIX) && !defined(OS_OPENBSD) +#if !defined(OS_MACOSX) && !defined(OS_WIN) && !defined(OS_SOLARIS) && !defined(OS_AIX) && !defined(OS_OPENBSD) && !defined(OS_FREEBSD) if (soptions.use_direct_writes) { rocksdb::SyncPoint::GetInstance()->SetCallBack( "NewWritableFile:O_DIRECT", [&](void* arg) { @@ -1205,7 +1205,7 @@ TEST_P(EnvPosixTestWithParam, ConsistentChildrenAttributes) { oss << test::TmpDir(env_) << "/testfile_" << i; const std::string path = oss.str(); unique_ptr file; -#if !defined(OS_MACOSX) && !defined(OS_WIN) && !defined(OS_SOLARIS) && !defined(OS_AIX) && !defined(OS_OPENBSD) +#if !defined(OS_MACOSX) && !defined(OS_WIN) && !defined(OS_SOLARIS) && !defined(OS_AIX) && !defined(OS_OPENBSD) && !defined(OS_FREEBSD) if (soptions.use_direct_writes) { rocksdb::SyncPoint::GetInstance()->SetCallBack( "NewWritableFile:O_DIRECT", [&](void* arg) {