diff options
Diffstat (limited to 'tools/include')
| -rw-r--r-- | tools/include/nolibc/fcntl.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/tools/include/nolibc/fcntl.h b/tools/include/nolibc/fcntl.h index ed2f5553c65a..56650a36f856 100644 --- a/tools/include/nolibc/fcntl.h +++ b/tools/include/nolibc/fcntl.h @@ -66,4 +66,14 @@ int open(const char *path, int flags, ...) return __sysret(_sys_open(path, flags, mode)); } +/* + * int creat(const char *path, mode_t mode); + */ + +static __attribute__((unused)) +int creat(const char *path, mode_t mode) +{ + return open(path, O_CREAT | O_WRONLY | O_TRUNC, mode); +} + #endif /* _NOLIBC_FCNTL_H */ |
