From 87fe8485a72eb8325502c5130f802811511d40a4 Mon Sep 17 00:00:00 2001 From: Enno Zickler Date: Thu, 25 Jan 2018 10:51:35 +0100 Subject: [PATCH] Fix O_DIRECT option The O_DIRECT option was not working as set_o_direct_flag() were moved to utilities.c but there the #define _GNU_SOURCE where missing. This lead to not the Waring "cannot use O_DIRECT". --- src/utilities.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/utilities.c b/src/utilities.c index 9de14f4..783fb2e 100755 --- a/src/utilities.c +++ b/src/utilities.c @@ -16,6 +16,10 @@ # include "config.h" #endif +#ifdef __linux__ +# define _GNU_SOURCE /* Needed for O_DIRECT in fcntl */ +#endif /* __linux__ */ + #include #include #include