From 14685d65958bed4d68b9c60564fa8d09aa746462 Mon Sep 17 00:00:00 2001 From: cinap_lenrek Date: Wed, 4 May 2016 00:23:48 +0200 Subject: 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. --- sys/src/ape/lib/ap/stdio/strerror.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sys/src/ape/lib/ap/stdio/strerror.c') 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) -- cgit v1.2.3