X-Git-Url: https://git.ozlabs.org/?p=ccan;a=blobdiff_plain;f=ccan%2Frfc822%2Frfc822.c;h=636d29a612c2c4b189af9f0fc50cfb7ad4957643;hp=08c0541328396c10f0afa59486429602610b4c16;hb=9a483e66096528915f59d875931a48eab523ca82;hpb=1db16ab68ecaba42daa8e0a38102c04399146f5e diff --git a/ccan/rfc822/rfc822.c b/ccan/rfc822/rfc822.c index 08c05413..636d29a6 100644 --- a/ccan/rfc822/rfc822.c +++ b/ccan/rfc822/rfc822.c @@ -8,6 +8,7 @@ #include #include +#include #include #ifdef TAL_USE_TALLOC @@ -16,24 +17,6 @@ #include #endif -#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 - static void (*allocation_failure_hook)(const char *); static void NORETURN default_allocation_failure(const char *s)