summaryrefslogtreecommitdiff
path: root/src/stat/fstatat.c
diff options
context:
space:
mode:
authorRich Felker <dalias@aerifal.cx>2022-04-28 02:14:34 -0400
committerRich Felker <dalias@aerifal.cx>2022-05-01 23:25:21 -0400
commitc9ba0769a749e4e08fd8a8815b8ced96fba4927b (patch)
tree2e2ec7fdaffb7779b45d2d70298659a7cc2821f1 /src/stat/fstatat.c
parent7edbcbeb76cb46381c34e2c0491dcc459cd5fa46 (diff)
downloadmusl-c9ba0769a749e4e08fd8a8815b8ced96fba4927b.tar.gz
provide an internal namespace-safe __fstatat
this makes it so we can drop direct stat syscall use in interfaces that can't use the POSIX namespace.
Diffstat (limited to 'src/stat/fstatat.c')
-rw-r--r--src/stat/fstatat.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/stat/fstatat.c b/src/stat/fstatat.c
index de165b5c..cf11a294 100644
--- a/src/stat/fstatat.c
+++ b/src/stat/fstatat.c
@@ -131,7 +131,7 @@ static int fstatat_kstat(int fd, const char *restrict path, struct stat *restric
return 0;
}
-int fstatat(int fd, const char *restrict path, struct stat *restrict st, int flag)
+int __fstatat(int fd, const char *restrict path, struct stat *restrict st, int flag)
{
int ret;
if (sizeof((struct kstat){0}.st_atime_sec) < sizeof(time_t)) {
@@ -142,6 +142,8 @@ int fstatat(int fd, const char *restrict path, struct stat *restrict st, int fla
return __syscall_ret(ret);
}
+weak_alias(__fstatat, fstatat);
+
#if !_REDIR_TIME64
weak_alias(fstatat, fstatat64);
#endif