repo.or.cz
/
musl.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
move msghdr and cmsghdr out of bits/socket.h
[musl.git]
/
src
/
unistd
/
readlink.c
blob
a152d52492ed775d3d8fd57125423e461bfb20d8
1
#include <unistd.h>
2
#include <fcntl.h>
3
#include
"syscall.h"
4
5
ssize_t
readlink
(
const char
*
restrict path
,
char
*
restrict buf
,
size_t
bufsize
)
6
{
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
12
}