14 lines
248 B
C++
14 lines
248 B
C++
|
#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);
|
||
|
}
|
||
|
}
|