summaryrefslogtreecommitdiff
path: root/util
diff options
context:
space:
mode:
authorcostan <costan@google.com>2018-04-17 13:23:10 -0700
committerVictor Costan <pwnall@chromium.org>2018-04-17 13:26:47 -0700
commitd177a0263cce4344d05188521ad53459c369b940 (patch)
tree0777844f4688d9f27040a9fe5defdb8b98c402c9 /util
parent14cce848e7b8a040a8f457d5a796722a55e19597 (diff)
downloadleveldb-d177a0263cce4344d05188521ad53459c369b940.tar.gz
Replace port_posix with port_stdcxx.
The porting layer implements threading primitives: atomic pointers, condition variables, mutexes, thread-safe initialization. These are all specified in C++11, so the reference open source port implementation can become platform-independent. The porting layer will remain in place to allow the use of other implementations with more features, such as the built-in deadlock detection in abseil's Mutex. ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=193245934
Diffstat (limited to 'util')
-rw-r--r--util/env_posix.cc6
1 files changed, 6 insertions, 0 deletions
diff --git a/util/env_posix.cc b/util/env_posix.cc
index e758d5f..51844ad 100644
--- a/util/env_posix.cc
+++ b/util/env_posix.cc
@@ -28,6 +28,12 @@
#include "util/posix_logger.h"
#include "util/env_posix_test_helper.h"
+// HAVE_FDATASYNC is defined in the auto-generated port_config.h, which is
+// included by port_stdcxx.h.
+#if !HAVE_FDATASYNC
+#define fdatasync fsync
+#endif // !HAVE_FDATASYNC
+
namespace leveldb {
namespace {