diff options
author | antirez <antirez@gmail.com> | 2015-02-10 09:29:14 +0100 |
---|---|---|
committer | antirez <antirez@gmail.com> | 2015-03-18 11:29:32 +0100 |
commit | d225e79b8d0f1f2b94136ccc84b726a537dc8f04 (patch) | |
tree | 507ca5dabc186142572903b12ce10c779899ca74 | |
parent | 586211ae60a9ad7a78dc8756355e3791e97794cb (diff) | |
download | redis-d225e79b8d0f1f2b94136ccc84b726a537dc8f04.tar.gz |
HAVE_SYNC_FILE_RANGE should be protected by ifdef __linux__.
Related to issue #2372.
-rw-r--r-- | src/config.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/config.h b/src/config.h index 5a3e77c90..9ec65fc71 100644 --- a/src/config.h +++ b/src/config.h @@ -91,6 +91,7 @@ /* Define rdb_fsync_range to sync_file_range() on Linux, otherwise we use * the plain fsync() call. */ +#ifdef __linux__ #if defined(__GLIBC__) && defined(__GLIBC_PREREQ) #if (LINUX_VERSION_CODE >= 0x020611 && __GLIBC_PREREQ(2, 6)) #define HAVE_SYNC_FILE_RANGE 1 @@ -100,6 +101,7 @@ #define HAVE_SYNC_FILE_RANGE 1 #endif #endif +#endif #ifdef HAVE_SYNC_FILE_RANGE #define rdb_fsync_range(fd,off,size) sync_file_range(fd,off,size,SYNC_FILE_RANGE_WAIT_BEFORE|SYNC_FILE_RANGE_WRITE) |