X-Git-Url: http://git.ozlabs.org/?a=blobdiff_plain;f=ccan%2Frfc822%2Frfc822.c;h=636d29a612c2c4b189af9f0fc50cfb7ad4957643;hb=58c5a3524737ec1f6500dd766f717e2f158fc5c0;hp=08c0541328396c10f0afa59486429602610b4c16;hpb=e4b6a262822484244b52c476d1b4cc9c4fd8ee2b;p=ccan 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)