#include #include #include #include #include extern "C" { int open(const char* pathname, int flags) { return (int)syscall(SYS_open, pathname, flags); } int fcntl(int fd, int cmd, ...) { va_list ap; va_start(ap, cmd); long result = syscall(SYS_fcntl, fd, cmd, va_arg(ap, uintptr_t)); va_end(ap); return (int)result; } }