summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcharsyam <charsyam@gmail.com>2012-10-26 04:27:58 +0800
committerantirez <antirez@gmail.com>2012-10-26 09:30:35 +0200
commitb25b0dc5f43e828b784188b6aa9f463a4ccf6f6e (patch)
tree7911967e9a8cae81d666f40f0d6e3096c02b26dd
parent2b5fc529a44790b89530756e36646de810c7be9c (diff)
downloadredis-b25b0dc5f43e828b784188b6aa9f463a4ccf6f6e.tar.gz
patch config.h for sync_file_range
-rw-r--r--src/config.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/config.h b/src/config.h
index ce7e53b02..57acb6db4 100644
--- a/src/config.h
+++ b/src/config.h
@@ -56,12 +56,13 @@
* the plain fsync() call. */
#ifdef __linux__
#include <linux/version.h>
+#include <features.h>
#ifdef __GLIBC__
-#if (LINUX_VERSION_CODE >= 0x020617 && GLIBC_VERSION_AT_LEAST(2, 6))
+#if (LINUX_VERSION_CODE >= 0x020611 && __GLIBC_PREREQ(2, 6))
#define HAVE_SYNC_FILE_RANGE 1
#endif
#else
-#if (LINUX_VERSION_CODE >= 0x020617)
+#if (LINUX_VERSION_CODE >= 0x020611)
#define HAVE_SYNC_FILE_RANGE 1
#endif
#endif