diff options
author | midipix <writeonce@midipix.org> | 2021-04-13 18:15:38 +0000 |
---|---|---|
committer | midipix <writeonce@midipix.org> | 2021-04-15 08:03:32 +0000 |
commit | c81d169af088b6b90d850d7c0f5c5daae6cfc4ba (patch) | |
tree | 4f9a8dbaff4ebae2ec685e8755fb1449644ee744 /src/internal/slibtool_readlink_impl.h | |
parent | 7ae5c14d2b4cc2dce023dac9bdf6020962c7bcec (diff) | |
download | slibtool-c81d169af088b6b90d850d7c0f5c5daae6cfc4ba.tar.bz2 slibtool-c81d169af088b6b90d850d7c0f5c5daae6cfc4ba.tar.xz |
library: replace all uses of [slbt_]readlink() with [slbt_]readlinkat().
Diffstat (limited to 'src/internal/slibtool_readlink_impl.h')
-rw-r--r-- | src/internal/slibtool_readlink_impl.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/internal/slibtool_readlink_impl.h b/src/internal/slibtool_readlink_impl.h index 644a638..3730b1e 100644 --- a/src/internal/slibtool_readlink_impl.h +++ b/src/internal/slibtool_readlink_impl.h @@ -10,14 +10,15 @@ #include <unistd.h> #include <errno.h> -static inline int slbt_readlink( +static inline int slbt_readlinkat( + int fdcwd, const char * restrict path, char * restrict buf, ssize_t bufsize) { ssize_t ret; - if ((ret = readlink(path,buf,bufsize)) <= 0) { + if ((ret = readlinkat(fdcwd,path,buf,bufsize)) <= 0) { return -1; } else if (ret == bufsize) { errno = ENOBUFS; |