From: Andrew Deason Date: Wed, 7 Oct 2009 22:19:22 +0000 (-0500) Subject: Prototype strcasestr in afsmonitor.c X-Git-Tag: openafs-devel-1_5_66~108 X-Git-Url: https://git.michaelhowe.org/gitweb/?a=commitdiff_plain;h=72c2473724e1b0a8cdc4a9e3e7639d80e5ec1086;p=packages%2Fo%2Fopenafs.git Prototype strcasestr in afsmonitor.c If we HAVE_STRCASESTR, we lack the prototype for strcasestr in afsmonitor.c unless we def _GNU_SOURCE before including string.h on GNU systems. To avoid side-effects or pulling in extra stuff, just prototype strcasestr ourselves for the time being (if we have it) instead of def'ing _GNU_SOURCE. Reviewed-on: http://gerrit.openafs.org/595 Tested-by: Derrick Brashear Reviewed-by: Derrick Brashear --- diff --git a/src/afsmonitor/afsmonitor.c b/src/afsmonitor/afsmonitor.c index cda39a7f5..39846cd97 100644 --- a/src/afsmonitor/afsmonitor.c +++ b/src/afsmonitor/afsmonitor.c @@ -258,7 +258,9 @@ extern char *cm_categories[]; /* cache manager data category names */ -#ifndef HAVE_STRCASESTR +#ifdef HAVE_STRCASESTR +extern char * strcasestr(const char *, const char *); +#else /* strcasestr(): Return first occurence of pattern s2 in s1, case insensitive.