summaryrefslogblamecommitdiff
path: root/src/unistd/readlink.c
blob: a152d52492ed775d3d8fd57125423e461bfb20d8 (plain) (tree)
1
2
3
4
5
6
7
8
                   
                  

                    
                                                                               
 
                   
                                                         


                                                                     
 
#include <unistd.h>
#include <fcntl.h>
#include "syscall.h"

ssize_t readlink(const char *restrict path, char *restrict buf, size_t bufsize)
{
#ifdef SYS_readlink
	return syscall(SYS_readlink, path, buf, bufsize);
#else
	return syscall(SYS_readlinkat, AT_FDCWD, path, buf, bufsize);
#endif
}