about summary refs log tree commit diff
path: root/src/fcntl/creat.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/fcntl/creat.c')
-rw-r--r--src/fcntl/creat.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/fcntl/creat.c b/src/fcntl/creat.c
new file mode 100644
index 00000000..be05faae
--- /dev/null
+++ b/src/fcntl/creat.c
@@ -0,0 +1,9 @@
+#include <fcntl.h>
+#include "libc.h"
+
+int creat(const char *filename, mode_t mode)
+{
+	return open(filename, O_CREAT|O_WRONLY|O_TRUNC, mode);
+}
+
+LFS64(creat);