mirror of
https://git.proxmox.com/git/wasi-libc
synced 2025-07-27 04:53:45 +00:00
Define an __errno_location
function. (#347)
This function returns the address of `errno`, which makes it easier to access from non-C languages since `errno` is a thread-local variable which requires a special ABI.
This commit is contained in:
parent
a00bf321ee
commit
2bb5abedbd
@ -48,6 +48,7 @@ __do_des
|
||||
__do_orphaned_stdio_locks
|
||||
__duplocale
|
||||
__env_rm_add
|
||||
__errno_location
|
||||
__exp2f_data
|
||||
__exp_data
|
||||
__expo2
|
||||
|
@ -38,6 +38,7 @@ __des_setkey
|
||||
__do_des
|
||||
__duplocale
|
||||
__env_rm_add
|
||||
__errno_location
|
||||
__exp2f_data
|
||||
__exp_data
|
||||
__expo2
|
||||
|
5
libc-bottom-half/sources/__errno_location.c
Normal file
5
libc-bottom-half/sources/__errno_location.c
Normal file
@ -0,0 +1,5 @@
|
||||
#include <errno.h>
|
||||
|
||||
int *__errno_location(void) {
|
||||
return &errno;
|
||||
}
|
Loading…
Reference in New Issue
Block a user