musl/src/stat/lstat.c

16 lines
305 B
C
Raw Normal View History

2011-02-12 00:22:29 -05:00
#include <sys/stat.h>
#include <fcntl.h>
2011-02-12 00:22:29 -05:00
#include "syscall.h"
#include "libc.h"
int lstat(const char *restrict path, struct stat *restrict buf)
2011-02-12 00:22:29 -05:00
{
#ifdef SYS_lstat
return syscall(SYS_lstat, path, buf);
#else
return syscall(SYS_fstatat, AT_FDCWD, path, buf, AT_SYMLINK_NOFOLLOW);
#endif
2011-02-12 00:22:29 -05:00
}
LFS64(lstat);