musl/src/unistd/readlink.c

13 lines
292 B
C
Raw Normal View History

2011-02-12 05:22:29 +00:00
#include <unistd.h>
#include <fcntl.h>
2011-02-12 05:22:29 +00:00
#include "syscall.h"
ssize_t readlink(const char *restrict path, char *restrict buf, size_t bufsize)
2011-02-12 05:22:29 +00:00
{
#ifdef SYS_readlink
return syscall(SYS_readlink, path, buf, bufsize);
#else
return syscall(SYS_readlinkat, AT_FDCWD, path, buf, bufsize);
#endif
2011-02-12 05:22:29 +00:00
}