-#if !HAVE_MEMMEM
-void *memmem(const void *haystack, size_t haystacklen,
- const void *needle, size_t needlelen)
-{
- const char *p, *last;
-
- p = haystack;
- last = p + haystacklen - needlelen;
-
- do {
- if (memcmp(p, needle, needlelen) == 0)
- return (void *)p;
- } while (p++ <= last);
-
- return NULL;
-}
-#endif
-