simplelink: use 'errno' instead of '*__errno()' for picolibc compat

Picolibc doesn't always use an __errno function, preferring to use TLS
errno variable instead as that's more efficient. But, that means
applications shouldn't dig through the original errno abstraction to
use the underlying implementation directly.

Signed-off-by: Keith Packard <keithp@keithp.com>
This commit is contained in:
Keith Packard 2022-10-18 18:52:52 -07:00 committed by Christopher Friedt
parent a5ffc6dc73
commit 5e7d5cd584
1 changed files with 1 additions and 1 deletions

View File

@ -110,7 +110,7 @@ int dpl_set_errno(int err)
* __errno() is a Zephyr function returning a pointer to the
* current thread's errno variable.
*/
*__errno() = (err < 0? -err : err);
errno = (err < 0? -err : err);
return -1;
}
#endif