base: fix build errors with gcc 12

Fixes #4829
This commit is contained in:
Christian Prochaska
2023-05-02 09:40:21 +02:00
committed by Christian Helmuth
parent 98bf2dadb8
commit eab8db228b
3 changed files with 3 additions and 2 deletions

View File

@ -111,6 +111,7 @@ namespace Genode {
/**
* Return length of null-terminated string in bytes
*/
__attribute((optimize("no-tree-loop-distribute-patterns")))
inline size_t strlen(const char *s)
{
size_t res = 0;