1 --- a/lib/ext2fs/unix_io.c
2 +++ b/lib/ext2fs/unix_io.c
3 @@ -428,6 +428,7 @@ static errcode_t unix_open(const char *n
4 struct unix_private_data *data = NULL;
11 @@ -464,7 +465,11 @@ static errcode_t unix_open(const char *n
12 if (flags & IO_FLAG_EXCLUSIVE)
14 if (flags & IO_FLAG_DIRECT_IO)
15 +#if !defined(O_DIRECT) && defined(F_NOCACHE)
16 + f_nocache = F_NOCACHE;
18 open_flags |= O_DIRECT;
23 @@ -477,6 +482,13 @@ static errcode_t unix_open(const char *n
28 + if (fcntl(data->dev, f_nocache, 1) < 0) {
35 if (flags & IO_FLAG_DIRECT_IO) {
36 if (ioctl(data->dev, BLKSSZGET, &data->align) != 0)