From 4bad431c90c72c945d9ce7053775d66be1e563ca Mon Sep 17 00:00:00 2001 From: Ryan Pavlik Date: Fri, 28 Oct 2011 12:15:48 -0500 Subject: main.cc: Only sync() if we can. --- src/main.cc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/main.cc b/src/main.cc index c47e1d8..aab583f 100644 --- a/src/main.cc +++ b/src/main.cc @@ -373,10 +373,11 @@ void setupConfigFiles(const std::string& dirname, const std::string& rc) { sync_fs = true; } } - +#ifdef HAVE_SYNC if (sync_fs) { sync(); } +#endif } @@ -413,7 +414,9 @@ void updateConfigFilesIfNeeded(const std::string& rc_file) { << commandargs << "' failed." << endl; } +#ifdef HAVE_SYNC sync(); +#endif // HAVE_SYNC } } -- cgit v0.11.2