aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--configure.ac1
-rw-r--r--lib/strequal.c4
2 files changed, 5 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index d93fc49cc..0a40e5595 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1900,6 +1900,7 @@ AC_CHECK_FUNCS( strtoll \
select \
strdup \
strstr \
+ strcasestr \
strtok_r \
uname \
strcasecmp \
diff --git a/lib/strequal.c b/lib/strequal.c
index cb8767002..adf84403d 100644
--- a/lib/strequal.c
+++ b/lib/strequal.c
@@ -90,6 +90,9 @@ int curl_strnequal(const char *first, const char *second, size_t max)
*/
char *Curl_strcasestr(const char *haystack, const char *needle)
{
+#if defined(HAVE_STRCASESTR)
+ return strcasestr(haystack, needle);
+#else
size_t nlen = strlen(needle);
size_t hlen = strlen(haystack);
@@ -99,6 +102,7 @@ char *Curl_strcasestr(const char *haystack, const char *needle)
haystack++;
}
return NULL;
+#endif
}
#ifndef HAVE_STRLCAT