move msghdr and cmsghdr out of bits/socket.h
[musl.git] / src / unistd / readlink.c
bloba152d52492ed775d3d8fd57125423e461bfb20d8
1 #include <unistd.h>
2 #include <fcntl.h>
3 #include "syscall.h"
5 ssize_t readlink(const char *restrict path, char *restrict buf, size_t bufsize)
7 #ifdef SYS_readlink
8 return syscall(SYS_readlink, path, buf, bufsize);
9 #else
10 return syscall(SYS_readlinkat, AT_FDCWD, path, buf, bufsize);
11 #endif