diff options
author | midipix <writeonce@midipix.org> | 2021-04-20 22:15:00 +0000 |
---|---|---|
committer | midipix <writeonce@midipix.org> | 2021-04-20 19:27:27 +0000 |
commit | 25a377af92d753ba157274e2b8ee630372c0619d (patch) | |
tree | f858c5be1ded00a6df8c66bc896ac01803c280a6 /src/internal | |
parent | a8e1b46ade78289800f2e8b65b7f6e6e6fa7a9c4 (diff) | |
download | tpax-25a377af92d753ba157274e2b8ee630372c0619d.tar.bz2 tpax-25a377af92d753ba157274e2b8ee630372c0619d.tar.xz |
internals: replace tpax_readlink() with tpax_readlinkat().
Diffstat (limited to 'src/internal')
-rw-r--r-- | src/internal/tpax_readlink_impl.h | 5 |
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; |