mirror of
https://github.com/fluencelabs/redis
synced 2025-03-30 22:31:03 +00:00
HAVE_SYNC_FILE_RANGE should be protected by ifdef __linux__.
Related to issue #2372.
This commit is contained in:
parent
50a57c67b2
commit
9e9abe29fe
@ -96,6 +96,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
|
||||||
@ -105,6 +106,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)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user