Luna/libc/src/fcntl.cpp

14 lines
248 B
C++
Raw Normal View History

#include <bits/errno-return.h>
#include <fcntl.h>
#include <sys/syscall.h>
#include <unistd.h>
extern "C"
{
int open(const char* path, int flags)
{
long rc = syscall(SYS_open, path, flags);
__errno_return(rc, int);
}
}