build: detect whether there is strchrnul

This should help compiling on macosx
This commit is contained in:
Boris Faure 2019-11-07 20:43:27 +01:00
parent 6f8997d194
commit 02f4173387
2 changed files with 5 additions and 1 deletions

View File

@ -78,6 +78,10 @@ if cc.has_function('mkstemps')
config_data.set('HAVE_MKSTEMPS', 1)
endif
if cc.has_function('strchrnul')
config_data.set('HAVE_STRCHRNUL', 1)
endif
url_head_code = '''#include <Ecore_Con.h>
int main(void) { ecore_con_url_head(NULL); return 0; }
'''

View File

@ -3418,7 +3418,7 @@ _eina_unicode_to_hex(Eina_Unicode u)
return -1;
}
#if defined(__OpenBSD__)
#if !defined(HAVE_STRCHRNUL)
char *
strchrnul(const char *s, int c)
{