summaryrefslogtreecommitdiff
path: root/libgcompat
diff options
context:
space:
mode:
authorSamuel Holland <samuel@sholland.org>2018-09-11 22:30:45 -0500
committerSamuel Holland <samuel@sholland.org>2018-09-11 22:50:44 -0500
commit5c4d07699c7c6f83d10657f03ae89dee6735226f (patch)
tree8d6d5247fe1759138b85c86e5000906c881d7ac9 /libgcompat
parente9224395eba97e86d8d411f016972b2d70cd6ff3 (diff)
downloadgcompat-5c4d07699c7c6f83d10657f03ae89dee6735226f.tar.gz
gcompat-5c4d07699c7c6f83d10657f03ae89dee6735226f.tar.bz2
gcompat-5c4d07699c7c6f83d10657f03ae89dee6735226f.tar.xz
gcompat-5c4d07699c7c6f83d10657f03ae89dee6735226f.zip
readlink: Report EIO on /proc read failure
Signed-off-by: Samuel Holland <samuel@sholland.org>
Diffstat (limited to 'libgcompat')
-rw-r--r--libgcompat/readlink.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/libgcompat/readlink.c b/libgcompat/readlink.c
index 0db094c..9b3e2dd 100644
--- a/libgcompat/readlink.c
+++ b/libgcompat/readlink.c
@@ -80,6 +80,7 @@ ssize_t readlink(const char *path, char *buf, size_t len)
close(fd);
fail:
exe[0] = '\0';
+ errno = EIO;
return -1;
}