From 91969d4d48ed1698772988ba8f23d0d356d35c1b Mon Sep 17 00:00:00 2001 From: apio Date: Sat, 22 Oct 2022 12:12:52 +0200 Subject: [PATCH] libc: strtoul's endptr must not be const --- libs/libc/include/stdlib.h | 2 +- libs/libc/src/stdlib.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/libs/libc/include/stdlib.h b/libs/libc/include/stdlib.h index 1909b7e6..37018749 100644 --- a/libs/libc/include/stdlib.h +++ b/libs/libc/include/stdlib.h @@ -31,7 +31,7 @@ extern "C" long long atoll(const char* str); /* Returns an integer (of type unsigned long) parsed from the string str. */ - unsigned long strtoul(const char* str, const char** endptr, int base); + unsigned long strtoul(const char* str, char** endptr, int base); /* Not implemented. */ char* getenv(const char*); diff --git a/libs/libc/src/stdlib.cpp b/libs/libc/src/stdlib.cpp index 941a73c0..9bb532cc 100644 --- a/libs/libc/src/stdlib.cpp +++ b/libs/libc/src/stdlib.cpp @@ -46,7 +46,7 @@ extern "C" return string_to_integer_type(str); } - unsigned long strtoul(const char* str, const char** endptr, int base) + unsigned long strtoul(const char* str, char** endptr, int base) { if (base != 0 && base != 10) NOT_IMPLEMENTED("strtoul with base not in (0,10)"); if (endptr) NOT_IMPLEMENTED("strtoul with non-null endptr");