[PATCH] fixup! errno: stub out perror/strerror API when built for PBL
Ahmad Fatoum
a.fatoum at pengutronix.de
Wed Oct 16 02:40:16 PDT 2024
Otherwise some compilers may complain that the result is passed directly
to printf("%s").
Signed-off-by: Ahmad Fatoum <a.fatoum at pengutronix.de>
---
include/errno.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/include/errno.h b/include/errno.h
index 9a008e375221..ea6a76a354ac 100644
--- a/include/errno.h
+++ b/include/errno.h
@@ -16,7 +16,7 @@ static inline void perror(const char *s)
}
static inline const char *strerror(int errnum)
{
- return NULL;
+ return "unknown error";
}
#endif
--
2.39.5
More information about the barebox
mailing list