diff options
author | Wang Yuan <wangyuan21@baidu.com> | 2021-08-15 04:52:44 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-08-14 23:52:44 +0300 |
commit | 8edc3cd62c0d0508b68c887610ca53b632b8165b (patch) | |
tree | 4a2de2e1872311883207b758a43ca938880d43ec /src/config.h | |
parent | 0cf2df84d4b27af4bffd2bf3543838f09e10f874 (diff) | |
download | redis-8edc3cd62c0d0508b68c887610ca53b632b8165b.tar.gz |
Fix the wrong detection of sync_file_range system call (#9371)
If we want to check `defined(SYNC_FILE_RANGE_WAIT_BEFORE)`, we should include fcntl.h.
otherwise, SYNC_FILE_RANGE_WAIT_BEFORE is not defined, and there is alway not `sync_file_range` system call.
Introduced by #8532
Diffstat (limited to 'src/config.h')
-rw-r--r-- | src/config.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/config.h b/src/config.h index af5209f89..4700e7208 100644 --- a/src/config.h +++ b/src/config.h @@ -36,6 +36,7 @@ #ifdef __linux__ #include <features.h> +#include <fcntl.h> #endif /* Define redis_fstat to fstat or fstat64() */ |