From db7c9e66c6e1f53ad15623a90fd66ab9de2b77ec Mon Sep 17 00:00:00 2001 From: Wang Yuan Date: Sun, 15 Aug 2021 04:52:44 +0800 Subject: [PATCH] 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 (cherry picked from commit 8edc3cd62c0d0508b68c887610ca53b632b8165b) --- src/config.h | 1 + 1 file changed, 1 insertion(+) diff --git a/src/config.h b/src/config.h index 56c1ab6ae..2f351a1b4 100644 --- a/src/config.h +++ b/src/config.h @@ -36,6 +36,7 @@ #ifdef __linux__ #include +#include #endif /* Define redis_fstat to fstat or fstat64() */