1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-14 09:24:57 +00:00

LibC: Fix memmem signature compliance

This commit is contained in:
Emily Trau 2023-06-04 16:49:03 -07:00 committed by Andreas Kling
parent 7f6a49c085
commit 04b06afd39
2 changed files with 4 additions and 3 deletions

View file

@ -175,9 +175,10 @@ void* memmove(void* dest, void const* src, size_t n)
return dest;
}
void const* memmem(void const* haystack, size_t haystack_length, void const* needle, size_t needle_length)
// https://linux.die.net/man/3/memmem (GNU extension)
void* memmem(void const* haystack, size_t haystack_length, void const* needle, size_t needle_length)
{
return AK::memmem(haystack, haystack_length, needle, needle_length);
return const_cast<void*>(AK::memmem(haystack, haystack_length, needle, needle_length));
}
// https://pubs.opengroup.org/onlinepubs/9699919799/functions/strcpy.html