From 3bfedd252d2bf19d62c12d2ecd09ceb28543ee7d Mon Sep 17 00:00:00 2001 From: Intel A80486DX2-66 Date: Thu, 28 Dec 2023 00:02:52 +0300 Subject: [PATCH] reverse-ramdisk.c: set POSIX detection --- c-programming/reverse-ramdisk.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/c-programming/reverse-ramdisk.c b/c-programming/reverse-ramdisk.c index 56ec4ce..8beb570 100644 --- a/c-programming/reverse-ramdisk.c +++ b/c-programming/reverse-ramdisk.c @@ -18,7 +18,14 @@ To-Do: error handling on line 184, function fread() #include #include #include -#include + +#if _POSIX_VERSION >= 200809L && defined(_POSIX_SYNCHRONIZED_IO) +# include +# include +# define IS_POSIX 1 +#else +# define IS_POSIX 0 +#endif #ifdef DEBUG # define line_fail(x) do { \