From: Michael J Gruber Date: Sat, 26 Aug 2023 14:53:12 +0000 (+0200) Subject: compat: probe for strcasestr more thoroughly X-Git-Tag: archive/debian/0.38_rc2-1~2 X-Git-Url: https://git.cworth.org/git?p=notmuch;a=commitdiff_plain;h=a84dc2f7e64e70bd9696efe933671b2cbdfcd329 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 --- 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 ()