diff options
Diffstat (limited to 'Userland/Libraries/LibC/string.cpp')
-rw-r--r-- | Userland/Libraries/LibC/string.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/Userland/Libraries/LibC/string.cpp b/Userland/Libraries/LibC/string.cpp index 7e31d1f053..baed73c585 100644 --- a/Userland/Libraries/LibC/string.cpp +++ b/Userland/Libraries/LibC/string.cpp @@ -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 |