fix build when MICROPY_PY_ERRNO is 0

This commit is contained in:
Dan Halbert 2023-10-20 10:43:22 -04:00
parent 4b42a6f4a0
commit 6eb0607a53
1 changed files with 2 additions and 3 deletions

View File

@ -121,9 +121,6 @@ qstr mp_errno_to_str(mp_obj_t errno_val) {
#endif
}
#endif // MICROPY_PY_UERRNO
// For commonly encountered errors, return human readable strings, otherwise try errno name
const char *mp_common_errno_to_str(mp_obj_t errno_val, char *buf, size_t len) {
if (!mp_obj_is_small_int(errno_val)) {
@ -171,3 +168,5 @@ const char *mp_common_errno_to_str(mp_obj_t errno_val, char *buf, size_t len) {
#endif
return msg[0] != '\0' ? msg : NULL;
}
#endif // MICROPY_PY_ERRNO