summaryrefslogtreecommitdiff
path: root/source4/ntvfs/posix/pvfs_open.c
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2004-09-20 08:53:45 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 12:58:53 -0500
commit635f5fa942c2ecd82a2a787b96bf2ce2a587c616 (patch)
tree2952f1e15093152a1852ab50e50b6c79b74075e5 /source4/ntvfs/posix/pvfs_open.c
parentf2815e8412e629e426832ce60457a0f3fec85e4c (diff)
downloadsamba-635f5fa942c2ecd82a2a787b96bf2ce2a587c616.tar.gz
samba-635f5fa942c2ecd82a2a787b96bf2ce2a587c616.tar.bz2
samba-635f5fa942c2ecd82a2a787b96bf2ce2a587c616.zip
r2438: compile on systems without O_DIRECTORY (probably won't work, but I'll get to that later)
(This used to be commit 5e2027f8ec7248e48d1dfb94c3688c78c64a85c5)
Diffstat (limited to 'source4/ntvfs/posix/pvfs_open.c')
-rw-r--r--source4/ntvfs/posix/pvfs_open.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/source4/ntvfs/posix/pvfs_open.c b/source4/ntvfs/posix/pvfs_open.c
index 74badb2443..26fd444984 100644
--- a/source4/ntvfs/posix/pvfs_open.c
+++ b/source4/ntvfs/posix/pvfs_open.c
@@ -84,6 +84,11 @@ NTSTATUS pvfs_open(struct smbsrv_request *req, union smb_open *io)
flags |= O_RDWR;
+/* we need to do this differently to support systems without O_DIRECTORY */
+#ifndef O_DIRECTORY
+#define O_DIRECTORY 0
+#endif
+
if (io->generic.in.create_options & NTCREATEX_OPTIONS_DIRECTORY) {
flags = O_RDONLY | O_DIRECTORY;
if (pvfs->flags & PVFS_FLAG_READONLY) {