8000 esp8266/esp_mphal: Implement libc's errno. · kevincon/circuitpython@64ad838 · GitHub
[go: up one dir, main page]

Skip to content

Commit 64ad838

Browse files
committed
esp8266/esp_mphal: Implement libc's errno.
Using __errno() function, and redirect it to use mp_stream_errno from stream module. This is pre-requisite for integrating with 3rd-party libs, like BerkeleyDB.
1 parent 617bda2 commit 64ad838

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

esp8266/esp_mphal.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -259,3 +259,8 @@ int ets_esf_free_bufs(int idx) {
259259
}
260260
return cnt;
261261
}
262+
263+
extern int mp_stream_errno;
264+
int *__errno() {
265+
return &mp_stream_errno;
266+
}

0 commit comments

Comments
 (0)
0