libc: Add wrapper for the fstatat() system call
This commit is contained in:
parent
458e0a87cc
commit
2572d5b238
@ -29,6 +29,9 @@ extern "C"
|
|||||||
/* Retrieve information about a file. */
|
/* Retrieve information about a file. */
|
||||||
int fstat(int fd, struct stat* st);
|
int fstat(int fd, struct stat* st);
|
||||||
|
|
||||||
|
/* Retrieve information about a file. */
|
||||||
|
int fstatat(int dirfd, const char* path, struct stat* st, int flags);
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
@ -29,4 +29,10 @@ extern "C"
|
|||||||
long rc = syscall(SYS_fstatat, fd, "", st, AT_EMPTY_PATH);
|
long rc = syscall(SYS_fstatat, fd, "", st, AT_EMPTY_PATH);
|
||||||
__errno_return(rc, int);
|
__errno_return(rc, int);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int fstatat(int dirfd, const char* path, struct stat* st, int flags)
|
||||||
|
{
|
||||||
|
long rc = syscall(SYS_fstatat, dirfd, path, st, flags);
|
||||||
|
__errno_return(rc, int);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user