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 8edc3cd62c)
This commit is contained in:
Wang Yuan 2021-08-15 04:52:44 +08:00 committed by Oran Agra
parent dde1c975b8
commit 03cb27e8ec

View File

@ -36,6 +36,7 @@
#ifdef __linux__
#include <features.h>
#include <fcntl.h>
#endif
/* Define redis_fstat to fstat or fstat64() */