DynamicLoader: Add missing strlen definition

This commit is contained in:
Bananymous 2026-03-23 18:23:31 +02:00
parent 6a77754adf
commit cbe835a2c8
2 changed files with 10 additions and 0 deletions

View File

@ -28,6 +28,14 @@ static const char* errno_to_string(int error);
__builtin_unreachable(); __builtin_unreachable();
} }
size_t strlen(const char* s)
{
size_t len = 0;
while (*s++)
len++;
return len;
}
int strcmp(const char* s1, const char* s2) int strcmp(const char* s1, const char* s2)
{ {
const unsigned char* u1 = reinterpret_cast<const unsigned char*>(s1); const unsigned char* u1 = reinterpret_cast<const unsigned char*>(s1);

View File

@ -40,6 +40,8 @@ inline void print_uint(int fd, T val, uint8_t base = 10)
print(fd, ptr); print(fd, ptr);
} }
size_t strlen(const char* s);
int strcmp(const char* s1, const char* s2); int strcmp(const char* s1, const char* s2);
char* strcpy(char* __restrict s1, const char* __restrict s2); char* strcpy(char* __restrict s1, const char* __restrict s2);