From: Sean Cannella Date: Tue, 23 Jul 2013 18:25:13 +0000 (-0700) Subject: fix folly compilation on FreeBSD X-Git-Tag: v0.22.0~920 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=ea2da05cd8b5f6700e92822740982ee2597ea01a;p=folly.git fix folly compilation on FreeBSD Summary: - fix folly compilation on FreeBSD Github Author: Martin Matuska Test Plan: - compiled Reviewed By: tudorb@fb.com FB internal diff: D896747 --- diff --git a/folly/FileUtil.cpp b/folly/FileUtil.cpp index 2d9cabf8..4a4ca6b6 100644 --- a/folly/FileUtil.cpp +++ b/folly/FileUtil.cpp @@ -53,10 +53,12 @@ int fsyncNoInt(int fd) { } int fdatasyncNoInt(int fd) { -#ifndef __APPLE__ - return wrapNoInt(fdatasync, fd); -#else +#if defined(__APPLE__) return wrapNoInt(fcntl, fd, F_FULLFSYNC); +#elif defined(__FreeBSD__) + return wrapNoInt(fsync, fd); +#else + return wrapNoInt(fdatasync, fd); #endif }