diff options
author | Jeremy Allison <jra@samba.org> | 2007-03-01 21:36:05 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 12:18:19 -0500 |
commit | cc294350f99f5ce27b11704555f1a4d62d83cacc (patch) | |
tree | 206d22cdb0b2bed9a23e4336e1bdb3337dd6b1dd /source3 | |
parent | c75f0c6126cd0f028bd02e767e052702c1848b99 (diff) | |
download | samba-cc294350f99f5ce27b11704555f1a4d62d83cacc.tar.gz samba-cc294350f99f5ce27b11704555f1a4d62d83cacc.tar.bz2 samba-cc294350f99f5ce27b11704555f1a4d62d83cacc.zip |
r21640: Fix the build for broken platoforms without O_DIRECT or O_DIRECTORY.
Jeremy.
(This used to be commit 6a0f6fde0a19bfb4af4c7fa6f29d7015e884d86e)
Diffstat (limited to 'source3')
-rw-r--r-- | source3/libsmb/clifile.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/source3/libsmb/clifile.c b/source3/libsmb/clifile.c index 1f547ee305..ebace8f963 100644 --- a/source3/libsmb/clifile.c +++ b/source3/libsmb/clifile.c @@ -1804,12 +1804,16 @@ static uint32 open_flags_to_wire(int flags) if (flags & O_APPEND) { ret |= SMB_O_APPEND; } +#if defined(O_DIRECT) if (flags & O_DIRECT) { ret |= SMB_O_DIRECT; } +#endif +#if defined(O_DIRECTORY) if (flags & O_DIRECTORY) { ret |= SMB_O_DIRECTORY; } +#endif return ret; } @@ -1875,7 +1879,12 @@ int cli_posix_open(struct cli_state *cli, const char *fname, int flags, mode_t m int cli_posix_mkdir(struct cli_state *cli, const char *fname, mode_t mode) { +#if defined(O_DIRECTORY) return (cli_posix_open(cli, fname, O_CREAT|O_DIRECTORY, mode) == -1) ? -1 : 0; +#else + cli_set_nt_error(cli, NT_STATUS_NOT_IMPLEMENTED); + return -1; +#endif } /**************************************************************************** |