diff --git a/src/doomtype.h b/src/doomtype.h index da37bacbe..198162852 100644 --- a/src/doomtype.h +++ b/src/doomtype.h @@ -57,9 +57,9 @@ extern "C" { #define strnicmp(x,y,n) strncasecmp(x,y,n) #endif -#ifndef __cplusplus -char *strcasestr(const char *in, const char *what); -#define stristr strcasestr +char *nongnu_strcasestr(const char *in, const char *what); +#ifndef _GNU_SOURCE +#define strcasestr nongnu_strcasestr #endif #if defined (PC_DOS) || defined (_WIN32) || defined (__HAIKU__) diff --git a/src/strcasestr.c b/src/strcasestr.c index b266278ed..4904fb664 100644 --- a/src/strcasestr.c +++ b/src/strcasestr.c @@ -51,7 +51,7 @@ swapp (char ***ppap, char ***ppbp, char **cpap, char **cpbp) } char * -strcasestr (const char *s, const char *q) +nongnu_strcasestr (const char *s, const char *q) { size_t qn;