summaryrefslogtreecommitdiff
path: root/sys/src/ape/lib/ap/stdio
diff options
context:
space:
mode:
authorcinap_lenrek <cinap_lenrek@felloff.net>2016-05-04 00:23:48 +0200
committercinap_lenrek <cinap_lenrek@felloff.net>2016-05-04 00:23:48 +0200
commit14685d65958bed4d68b9c60564fa8d09aa746462 (patch)
treef2480af19061f27c67a36a2bb8fd7f41d047732a /sys/src/ape/lib/ap/stdio
parent7657312dcf5b9435ff848b20dfc3a0546ab8a500 (diff)
ape: return plan9 error strings from strerror()
when _syserrno() fails to map a plan9 error string to a unix error number, we copy the plan9 error string to the per process error buffer "plan9err" and set errno = EPLAN9. when strerror() is called with EPLAN9, it returns a pointer to the plan9err buffer.
Diffstat (limited to 'sys/src/ape/lib/ap/stdio')
-rw-r--r--sys/src/ape/lib/ap/stdio/strerror.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/src/ape/lib/ap/stdio/strerror.c b/sys/src/ape/lib/ap/stdio/strerror.c
index 300ee56ba..576abb088 100644
--- a/sys/src/ape/lib/ap/stdio/strerror.c
+++ b/sys/src/ape/lib/ap/stdio/strerror.c
@@ -81,7 +81,7 @@ char *sys_errlist[] = {
};
#define _IO_nerr (sizeof sys_errlist/sizeof sys_errlist[0])
int sys_nerr = _IO_nerr;
-extern char _plan9err[];
+extern char *_plan9err;
char *
strerror(int n)