the LFS64 macro was not self-documenting and barely saved any characters. simply use weak_alias directly so that it's clear what's being done, and doesn't depend on a header to provide a strange macro.
15 lines
301 B
C
15 lines
301 B
C
#include <sys/stat.h>
|
|
#include <fcntl.h>
|
|
#include "syscall.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
|
|
}
|
|
|
|
weak_alias(lstat, lstat64);
|