From 5274e3017838e62d465e5d9f46db297e3e41a3e6 Mon Sep 17 00:00:00 2001 From: Benjamin Valentin Date: Tue, 25 Apr 2023 23:01:26 +0200 Subject: [PATCH] cpu/avr8_common: implement perror() --- cpu/avr8_common/avr_libc_extra/posix_unistd.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/cpu/avr8_common/avr_libc_extra/posix_unistd.c b/cpu/avr8_common/avr_libc_extra/posix_unistd.c index 05aa350997..55b50f2285 100644 --- a/cpu/avr8_common/avr_libc_extra/posix_unistd.c +++ b/cpu/avr8_common/avr_libc_extra/posix_unistd.c @@ -177,4 +177,9 @@ ssize_t write(int fd, const void *src, size_t count) #endif } +void perror(const char *s) +{ + printf("%s: %s\n", s, strerror(errno)); +} + /** @} */