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.
This commit is contained in:
Paul Sokolovsky 2016-07-31 02:30:05 +03:00
parent 617bda27e9
commit 64ad838fde
1 changed files with 5 additions and 0 deletions

View File

@ -259,3 +259,8 @@ int ets_esf_free_bufs(int idx) {
}
return cnt;
}
extern int mp_stream_errno;
int *__errno() {
return &mp_stream_errno;
}