[PATCH] fixup! errno: stub out perror/strerror API when built for PBL

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Otherwise some compilers may complain that the result is passed directly
to printf("%s").

Signed-off-by: Ahmad Fatoum <a.fatoum@xxxxxxxxxxxxxx>
---
 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





[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux