summaryrefslogtreecommitdiffstats
path: root/contrib/syslinux-4.02/com32/lib/creat.c
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/syslinux-4.02/com32/lib/creat.c')
-rw-r--r--contrib/syslinux-4.02/com32/lib/creat.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/contrib/syslinux-4.02/com32/lib/creat.c b/contrib/syslinux-4.02/com32/lib/creat.c
new file mode 100644
index 0000000..3b4dc61
--- /dev/null
+++ b/contrib/syslinux-4.02/com32/lib/creat.c
@@ -0,0 +1,12 @@
+/*
+ * creat.c
+ */
+
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <fcntl.h>
+
+int creat(const char *pathname, mode_t mode)
+{
+ return open(pathname, O_CREAT | O_WRONLY | O_TRUNC, mode);
+}