From 72c2473724e1b0a8cdc4a9e3e7639d80e5ec1086 Mon Sep 17 00:00:00 2001 From: Andrew Deason Date: Wed, 7 Oct 2009 17:19:22 -0500 Subject: [PATCH] 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 --- src/afsmonitor/afsmonitor.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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. -- 2.39.5