summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>1998-10-05 00:32:09 +0000
committerAndrew Tridgell <tridge@samba.org>1998-10-05 00:32:09 +0000
commit86b66d92772d4a72b7b8c7f2d8d793533d7f6130 (patch)
tree8b1c3b2e59faa0ef0794e489135cf08b7a3b5a0b
parentc63ad1b69859653d67d4711b700015860680efff (diff)
downloadsamba-86b66d92772d4a72b7b8c7f2d8d793533d7f6130.tar.gz
samba-86b66d92772d4a72b7b8c7f2d8d793533d7f6130.tar.xz
samba-86b66d92772d4a72b7b8c7f2d8d793533d7f6130.zip
don't define creat() under linux until we get the CREAT_BITS stuff
sorted out.
-rw-r--r--source/smbwrapper/wrapped.c5
-rw-r--r--source/smbwrapper/wrapper.h6
2 files changed, 9 insertions, 2 deletions
diff --git a/source/smbwrapper/wrapped.c b/source/smbwrapper/wrapped.c
index 502a2a9113b..50f78ce0056 100644
--- a/source/smbwrapper/wrapped.c
+++ b/source/smbwrapper/wrapped.c
@@ -622,8 +622,9 @@ __asm__(".globl _write; _write = write");
}
#endif
+#ifndef LINUX
int creat(const char *path, mode_t mode)
{
- /* drat, including sys/fcntl.h gives conflicts */
- return open(path, 01101, mode);
+ return open(path, O_WRONLY|O_CREAT|O_TRUNC, mode);
}
+#endif
diff --git a/source/smbwrapper/wrapper.h b/source/smbwrapper/wrapper.h
index fec400a7241..3eccdcac1e0 100644
--- a/source/smbwrapper/wrapper.h
+++ b/source/smbwrapper/wrapper.h
@@ -31,6 +31,12 @@
#include <sys/acl.h>
#endif
+#ifndef LINUX
+#ifdef HAVE_SYS_FCNTL_H
+#include <sys/fcntl.h>
+#endif
+#endif
+
#include <stdio.h>
#include <dirent.h>
#include <errno.h>