provide an internal namespace-safe __fstat
[musl] / src / stat / fstat.c
index 9bbb46d..27db0cc 100644 (file)
@@ -4,12 +4,14 @@
 #include <fcntl.h>
 #include "syscall.h"
 
-int fstat(int fd, struct stat *st)
+int __fstat(int fd, struct stat *st)
 {
        if (fd<0) return __syscall_ret(-EBADF);
-       return fstatat(fd, "", st, AT_EMPTY_PATH);
+       return __fstatat(fd, "", st, AT_EMPTY_PATH);
 }
 
+weak_alias(__fstat, fstat);
+
 #if !_REDIR_TIME64
 weak_alias(fstat, fstat64);
 #endif