diff options
Diffstat (limited to 'libpsx/src/libc/error.c')
| -rw-r--r-- | libpsx/src/libc/error.c | 19 |
1 files changed, 19 insertions, 0 deletions
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 <stdio.h> +#include <string.h> + +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; +} |
