Skip to content

Commit ab13033

Browse files
evgeniy-paltsevgalak
authored andcommitted
ARC: MWDT: LIB: implement ___errno hook
Implement ___errno so ARC MWDT libc can use proper (Zephyr) errno Signed-off-by: Eugeniy Paltsev <[email protected]> Signed-off-by: Evgeniy Paltsev <[email protected]>
1 parent 64ff64a commit ab13033

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

lib/libc/arcmwdt/libc-hooks.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
/*
22
* Copyright (c) 2015, 2021 Intel Corporation.
3+
* Copyright (c) 2021 Synopsys.
34
*
45
* SPDX-License-Identifier: Apache-2.0
56
*/
@@ -56,3 +57,8 @@ int _write(int fd, const char *buf, unsigned int nbytes)
5657
return z_impl_zephyr_write_stdout(buf, nbytes);
5758
}
5859
#endif
60+
61+
int *___errno(void)
62+
{
63+
return z_errno();
64+
}

0 commit comments

Comments
 (0)