#include "strcasestr.h"
#include <ctype.h>
+#include <stddef.h> /* for NULL */
#if HAVE_MBRTOWC
# include "mbuiter.h"
{
if (!mbui_avail (rneedle))
/* Found a match. */
- return (char *) haystack;
+ return (char *) mbui_cur_ptr (iter_haystack);
if (!mbui_avail (rhaystack))
/* No match. */
return NULL;