From 7c24e9a9b02b04dcaf9507acb94091ea70a2c02d Mon Sep 17 00:00:00 2001 From: Xavi Del Campo Date: Fri, 31 Jan 2020 10:32:23 +0100 Subject: Imported pristine psxsdk-20190410 from official repo --- libpsx/src/libc/error.c | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 libpsx/src/libc/error.c (limited to 'libpsx/src/libc/error.c') diff --git a/libpsx/src/libc/error.c b/libpsx/src/libc/error.c new file mode 100644 index 0000000..6863b2f --- /dev/null +++ b/libpsx/src/libc/error.c @@ -0,0 +1,19 @@ +#include +#include + +static char strerror_not_implemented[64]; + +char *strerror(int errnum) +{ + strerror_r(errnum, strerror_not_implemented, 64); + + return strerror_not_implemented; +} + +int strerror_r(int errnum, char *strerrbuf, size_t buflen) +{ + snprintf(strerrbuf, buflen, + "strerror(%d)", errnum); + + return 0; +} -- cgit v1.2.3