aboutsummaryrefslogtreecommitdiffstats
path: root/guts/readlinkat.c
diff options
context:
space:
mode:
Diffstat (limited to 'guts/readlinkat.c')
-rw-r--r--guts/readlinkat.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/guts/readlinkat.c b/guts/readlinkat.c
index d483ab5..5282e2b 100644
--- a/guts/readlinkat.c
+++ b/guts/readlinkat.c
@@ -6,7 +6,15 @@
* wrap_readlinkat(int dirfd, const char *path, char *buf, size_t bufsiz) {
* ssize_t rc = -1;
*/
+#ifdef PSEUDO_NO_REAL_AT_FUNCTIONS
+ if (dirfd != AT_FDCWD) {
+ errno = ENOSYS;
+ return -1;
+ }
+ rc = real_readlink(path, buf, bufsiz);
+#else
rc = real_readlinkat(dirfd, path, buf, bufsiz);
+#endif
if (rc > 0) {
rc = pseudo_dechroot(buf, rc);