From: Rich Felker Date: Fri, 22 Feb 2013 04:54:25 +0000 (-0500) Subject: replace stub with working strcasestr X-Git-Url: http://nsz.repo.hu/git/?p=musl;a=commitdiff_plain;h=e864ddc36819814b3b9ed17620459d66add512d3 replace stub with working strcasestr --- diff --git a/src/string/strcasestr.c b/src/string/strcasestr.c index f1cb0e84..af109f36 100644 --- a/src/string/strcasestr.c +++ b/src/string/strcasestr.c @@ -1,7 +1,9 @@ +#define _GNU_SOURCE #include char *strcasestr(const char *h, const char *n) { - //FIXME! - return strstr(h, n); + size_t l = strlen(n); + for (; *h; h++) if (!strncasecmp(h, n, l)) return (char *)h; + return 0; }