From a84dc2f7e64e70bd9696efe933671b2cbdfcd329 Mon Sep 17 00:00:00 2001 From: Michael J Gruber Date: Sat, 26 Aug 2023 16:53:12 +0200 Subject: [PATCH] compat: probe for strcasestr more thoroughly Depending on compiler (gcc, g++, clang) and standard options (c99, c11), string.h may or may not include strings.h, leading to possibly missing or conflicting declarations of strcasestr. Include both so that both detection and compilation phases use the same (possibly optimised) implementations. Suggested-by: Thomas Schneider Suggested-by: Florian Weimer Suggested-by: Tomi Ollila --- compat/have_strcasestr.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/compat/have_strcasestr.c b/compat/have_strcasestr.c index 3cd1838d..8e004572 100644 --- a/compat/have_strcasestr.c +++ b/compat/have_strcasestr.c @@ -1,5 +1,6 @@ #define _GNU_SOURCE -#include +#include /* strcasecmp() in POSIX */ +#include /* strcasecmp() in *BSD */ int main () -- 2.43.0