summaryrefslogtreecommitdiffhomepage
path: root/src/internal/tpax_readlink_impl.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/internal/tpax_readlink_impl.h')
-rw-r--r--src/internal/tpax_readlink_impl.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/internal/tpax_readlink_impl.h b/src/internal/tpax_readlink_impl.h
index 328b302..7fdffc4 100644
--- a/src/internal/tpax_readlink_impl.h
+++ b/src/internal/tpax_readlink_impl.h
@@ -10,14 +10,15 @@
#include <unistd.h>
#include <errno.h>
-static inline int tpax_readlink(
+static inline int tpax_readlinkat(
+ int fdat,
const char * restrict path,
char * restrict buf,
ssize_t bufsize)
{
ssize_t ret;
- if ((ret = readlink(path,buf,bufsize)) <= 0) {
+ if ((ret = readlinkat(fdat,path,buf,bufsize)) <= 0) {
return -1;
} else if (ret == bufsize) {
errno = ENOBUFS;