Fix building on Linux

It seems that glibc doesn't support strnstr, and strcasestr requires
_GNU_SOURCE to be defined
This commit is contained in:
李通洲
2022-09-29 14:22:56 +08:00
parent b8656d5e12
commit e7c9b80d85
3 changed files with 3 additions and 3 deletions
@@ -1,5 +1,3 @@
#define _GNU_SOURCE //required for struct ucred
#include "displayserver_linux.h"
#include <stdlib.h>
+1 -1
View File
@@ -159,7 +159,7 @@ static inline FF_C_NODISCARD int ffStrbufIgnCaseComp(const FFstrbuf* strbuf, con
static inline FF_C_NODISCARD bool ffStrbufContainS(const FFstrbuf* strbuf, const char* str)
{
return strnstr(strbuf->chars, str, strbuf->length) != NULL;
return strstr(strbuf->chars, str) != NULL;
}
static inline FF_C_NODISCARD bool ffStrbufContainIgnCaseS(const FFstrbuf* strbuf, const char* str)