blob: 2c02033f239bef6026585de89f12fafd6f7d1a89 [file] [log] [blame]
#include <sys/stat.h>
#include <fcntl.h>
#include "syscall.h"
#include "libc.h"
int lstat(const char* restrict path, struct stat* restrict buf) {
#ifdef SYS_lstat
return syscall(SYS_lstat, path, buf);
#else
return syscall(SYS_fstatat, AT_FDCWD, path, buf, AT_SYMLINK_NOFOLLOW);
#endif
}