summaryrefslogtreecommitdiff
path: root/src/fcntl/creat.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/fcntl/creat.c')
-rw-r--r--src/fcntl/creat.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/fcntl/creat.c b/src/fcntl/creat.c
new file mode 100644
index 00000000..eab98ca8
--- /dev/null
+++ b/src/fcntl/creat.c
@@ -0,0 +1,11 @@
+#include "sys/types.h"
+#include <fcntl.h>
+
+int creat(const char *path, mode_t mode)
+{
+ return open(path, O_WRONLY | O_CREAT | O_TRUNC, mode);
+}
+
+/*
+POSIX(1)
+*/