Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ruanhaishen
redis
Commits
d225e79b
Commit
d225e79b
authored
Feb 10, 2015
by
antirez
Browse files
HAVE_SYNC_FILE_RANGE should be protected by ifdef __linux__.
Related to issue #2372.
parent
586211ae
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/config.h
View file @
d225e79b
...
@@ -91,6 +91,7 @@
...
@@ -91,6 +91,7 @@
/* Define rdb_fsync_range to sync_file_range() on Linux, otherwise we use
/* Define rdb_fsync_range to sync_file_range() on Linux, otherwise we use
* the plain fsync() call. */
* the plain fsync() call. */
#ifdef __linux__
#if defined(__GLIBC__) && defined(__GLIBC_PREREQ)
#if defined(__GLIBC__) && defined(__GLIBC_PREREQ)
#if (LINUX_VERSION_CODE >= 0x020611 && __GLIBC_PREREQ(2, 6))
#if (LINUX_VERSION_CODE >= 0x020611 && __GLIBC_PREREQ(2, 6))
#define HAVE_SYNC_FILE_RANGE 1
#define HAVE_SYNC_FILE_RANGE 1
...
@@ -100,6 +101,7 @@
...
@@ -100,6 +101,7 @@
#define HAVE_SYNC_FILE_RANGE 1
#define HAVE_SYNC_FILE_RANGE 1
#endif
#endif
#endif
#endif
#endif
#ifdef HAVE_SYNC_FILE_RANGE
#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)
#define rdb_fsync_range(fd,off,size) sync_file_range(fd,off,size,SYNC_FILE_RANGE_WAIT_BEFORE|SYNC_FILE_RANGE_WRITE)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment