mirror of
https://git.notmuchmail.org/git/notmuch
synced 2024-11-25 04:18:08 +01:00
a84dc2f7e6
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 <qsx@chaotikum.eu> Suggested-by: Florian Weimer <fweimer@redhat.com> Suggested-by: Tomi Ollila <tomi.ollila@iki.fi>
12 lines
229 B
C
12 lines
229 B
C
#define _GNU_SOURCE
|
|
#include <strings.h> /* strcasecmp() in POSIX */
|
|
#include <string.h> /* strcasecmp() in *BSD */
|
|
|
|
int
|
|
main ()
|
|
{
|
|
char *found;
|
|
const char *haystack, *needle;
|
|
|
|
found = strcasestr (haystack, needle);
|
|
}
|