diff --git a/common/utils.h b/common/utils.h index 040d093d..edcea35c 100644 --- a/common/utils.h +++ b/common/utils.h @@ -1011,7 +1011,7 @@ drmem_strndup(const char *src, size_t max, heapstat_t type); #define MAX_OPTION_LEN DR_MAX_OPTIONS_LENGTH #if !defined(MACOS) && !defined(ANDROID) && !defined(NOLINK_STRCASESTR) -const char * +char * strcasestr(const char *text, const char *pattern); #endif diff --git a/common/utils_shared.c b/common/utils_shared.c index 8cfca94a..7e93327b 100755 --- a/common/utils_shared.c +++ b/common/utils_shared.c @@ -51,7 +51,7 @@ strnchr(const char *str, int find, size_t max) * want a libc dependence. */ #if !defined(MACOS) && !defined(ANDROID) && !defined(NOLINK_STRCASESTR) -const char * +char * strcasestr(const char *text, const char *pattern) { const char *cur_text, *cur_pattern, *root; @@ -60,7 +60,7 @@ strcasestr(const char *text, const char *pattern) cur_pattern = pattern; while (true) { if (*cur_pattern == '\0') - return root; + return (char *) root; if (*cur_text == '\0') return NULL; /* XXX DRi#943: toupper is better, for int18n, and we need to call