diff options
Diffstat (limited to 'libc/sysdeps/linux/common/lstat64.c')
-rw-r--r-- | libc/sysdeps/linux/common/lstat64.c | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/libc/sysdeps/linux/common/lstat64.c b/libc/sysdeps/linux/common/lstat64.c index c43e53e1d..76637b556 100644 --- a/libc/sysdeps/linux/common/lstat64.c +++ b/libc/sysdeps/linux/common/lstat64.c @@ -9,11 +9,19 @@ #include <_lfs_64.h> #include <sys/syscall.h> +#include <unistd.h> +#include <sys/stat.h> -# include <unistd.h> -# include <sys/stat.h> +#if defined __NR_fstatat64 && !defined __NR_lstat +# include <fcntl.h> + +int lstat64(const char *file_name, struct stat64 *buf) +{ + return fstatat64(AT_FDCWD, file_name, buf, AT_SYMLINK_NOFOLLOW); +} +libc_hidden_def(lstat64) -#if defined __NR_fstatat64 && !defined __NR_lstat64 +#elif __WORDSIZE == 64 && defined __NR_newfstatat # include <fcntl.h> int lstat64(const char *file_name, struct stat64 *buf) |