diff options
Diffstat (limited to 'src/lib9/open.c')
| -rw-r--r-- | src/lib9/open.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/lib9/open.c b/src/lib9/open.c index 0356a7da..b70a9a27 100644 --- a/src/lib9/open.c +++ b/src/lib9/open.c @@ -1,3 +1,4 @@ +#define _GNU_SOURCE /* for Linux O_DIRECT */ #include <u.h> #define NOPLAN9DEFINES #include <libc.h> @@ -16,6 +17,10 @@ p9open(char *name, int mode) umode |= O_TRUNC; mode ^= OTRUNC; } + if(mode&ODIRECT){ + umode |= O_DIRECT; + mode ^= ODIRECT; + } if(mode){ werrstr("mode not supported"); return -1; |
