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:
李通洲 committed 2022-09-29 18:33:37 +08:00
1 parent b8656d5e12
commit e7c9b80d85
3 files changed
+3 -3

No files matched your search

@@ -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)