summaryrefslogtreecommitdiff
path: root/libpsx/src/libc/error.c
diff options
context:
space:
mode:
Diffstat (limited to 'libpsx/src/libc/error.c')
-rw-r--r--libpsx/src/libc/error.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/libpsx/src/libc/error.c b/libpsx/src/libc/error.c
index ab5fe5b..2cfd7e8 100644
--- a/libpsx/src/libc/error.c
+++ b/libpsx/src/libc/error.c
@@ -114,3 +114,8 @@ int strerror_r(int errnum, char *strerrbuf, size_t buflen)
snprintf(strerrbuf, buflen, "Unknown error %d", errnum);
return -1;
}
+
+void perror(const char *s)
+{
+ fprintf(stderr, "%s: %s\n", s, strerror(errno));
+}