Skip to content

Commit

Permalink
libc/newlib: define _LOCK_T
Browse files Browse the repository at this point in the history
Add definition of _LOCK_T to satisfy compiler about types in __ASSERT
statements, as it is done in picolibc.

Signed-off-by: Dawid Niedzwiecki <[email protected]>
  • Loading branch information
niedzwiecki-dawid committed Feb 21, 2024
1 parent 53f527c commit 7ee1bc4
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions lib/libc/newlib/libc-hooks.c
Original file line number Diff line number Diff line change
Expand Up @@ -304,6 +304,7 @@ void *_sbrk(intptr_t count)
__weak FUNC_ALIAS(_sbrk, sbrk, void *);

#ifdef CONFIG_MULTITHREADING
#define _LOCK_T void *

/* Make sure _RETARGETABLE_LOCKING is enabled in toolchain */
BUILD_ASSERT(IS_ENABLED(_RETARGETABLE_LOCKING), "Retargetable locking must be enabled");
Expand Down

0 comments on commit 7ee1bc4

Please sign in to comment.