summaryrefslogtreecommitdiff
path: root/source4/client/cifsddio.c
diff options
context:
space:
mode:
authorJames Peach <jpeach@samba.org>2006-01-31 21:56:12 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:51:39 -0500
commitad01edb37bdf7e1087eb18ed903b37dbc0241af1 (patch)
treee054203b4d0852a963b5bbcb03f21fa98ef1bedc /source4/client/cifsddio.c
parentb60415745a0038dbfdca752861201fba0d942ff6 (diff)
downloadsamba-ad01edb37bdf7e1087eb18ed903b37dbc0241af1.tar.gz
samba-ad01edb37bdf7e1087eb18ed903b37dbc0241af1.tar.bz2
samba-ad01edb37bdf7e1087eb18ed903b37dbc0241af1.zip
r13263: Check whether open(2) will accept the O_DIRECT flag. This should fix the
build on NetBSD. (This used to be commit 7354de62a7fbf3921dfcb0bd865e89bdf1ef5bcd)
Diffstat (limited to 'source4/client/cifsddio.c')
-rw-r--r--source4/client/cifsddio.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/source4/client/cifsddio.c b/source4/client/cifsddio.c
index 51528406bf..b13cf3fd08 100644
--- a/source4/client/cifsddio.c
+++ b/source4/client/cifsddio.c
@@ -99,8 +99,13 @@ open_fd_handle(const char * path, uint64_t iosz, int options)
fdh->h.io_write = fd_write_func;
fdh->h.io_seek = fd_seek_func;
- if (options & DD_DIRECT_IO)
+ if (options & DD_DIRECT_IO) {
+#ifdef HAVE_OPEN_O_DIRECT
oflags |= O_DIRECT;
+#else
+ DEBUG(1, ("no support for direct IO on this platform\n"));
+#endif
+ }
if (options & DD_SYNC_IO)
oflags |= O_SYNC;