Skip to content

Commit

Permalink
Soc/evalsoc: workaround for hightec c lib errno type error
Browse files Browse the repository at this point in the history
Signed-off-by: Huaqi Fang <[email protected]>
  • Loading branch information
fanghuaqi committed Jul 11, 2024
1 parent 92f2945 commit 6ca40fa
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions SoC/evalsoc/Common/Source/Stubs/newlib/stubs.c
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,10 @@
#include <nuclei_sdk_hal.h>

#undef errno
extern int errno;
#ifndef NEWLIB_THREAD_LOCAL_ERRNO
#define NEWLIB_THREAD_LOCAL_ERRNO
#endif
extern NEWLIB_THREAD_LOCAL_ERRNO int errno;

/* Key stub function for uart io via printf/scanf and heap management */
#undef putchar
Expand Down Expand Up @@ -87,7 +90,7 @@ __WEAK void* _sbrk(ptrdiff_t incr)

/* Other newlib stub functions, see https://sourceware.org/newlib/libc.html#Stubs */

int errno;
NEWLIB_THREAD_LOCAL_ERRNO int errno;
__WEAK void* __dso_handle = NULL;
/* version of environ for no OS. */
char *__env[1] = { 0 };
Expand Down

0 comments on commit 6ca40fa

Please sign in to comment.